diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-07-26 22:03:02 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-07-26 22:03:02 +0000 |
| commit | c1b8f8c0e669d426caaaa08cfc5c9d9545a3d0f1 (patch) | |
| tree | ec7b803219556d74db4a39237888737cea589ab0 /src | |
| parent | change "FileDescription" in inkscape.rc to include product name (diff) | |
| download | inkscape-c1b8f8c0e669d426caaaa08cfc5c9d9545a3d0f1.tar.gz inkscape-c1b8f8c0e669d426caaaa08cfc5c9d9545a3d0f1.zip | |
UX compres document dialog from Ronaldo idea with target to backport to 0.92.2
Diffstat (limited to 'src')
| -rw-r--r-- | src/ui/dialog/document-properties.cpp | 58 | ||||
| -rw-r--r-- | src/ui/dialog/document-properties.h | 4 | ||||
| -rw-r--r-- | src/ui/widget/page-sizer.cpp | 6 | ||||
| -rw-r--r-- | src/ui/widget/page-sizer.h | 1 |
4 files changed, 43 insertions, 26 deletions
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index 7d51653db..2765e63f4 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -207,7 +207,7 @@ DocumentProperties::~DocumentProperties() * widget in columns 2-3; (non-0, 0) means label in columns 1-3; and * (non-0, non-0) means two widgets in columns 2 and 3. */ -inline void attach_all(Gtk::Grid &table, Gtk::Widget *const arr[], unsigned const n, int start = 0, int docum_prop_flag = 0) +inline void attach_all(Gtk::Grid &table, Gtk::Widget *const arr[], unsigned const n, int start = 0, int docum_prop_flag = 0, bool indent = false) { for (unsigned i = 0, r = start; i < n; i += 2) { if (arr[i] && arr[i+1]) { @@ -226,7 +226,7 @@ inline void attach_all(Gtk::Grid &table, Gtk::Widget *const arr[], unsigned cons } if (docum_prop_flag) { // this sets the padding for subordinate widgets on the "Page" page - if( i==(n-8) || i==(n-10) ) { + if( indent && (i==(n-6) || i==(n-4) || i==(n-2)) ) { arr[i+1]->set_hexpand(); #if WITH_GTKMM_3_12 arr[i+1]->set_margin_start(20); @@ -305,29 +305,47 @@ void DocumentProperties::build_page() Gtk::Widget *const widget_array[] = { - label_gen, 0, - 0, &_rum_deflt, - //label_col, 0, - //_rcp_bg._label, &_rcp_bg, - 0, 0, - label_for, 0, - 0, &_page_sizer, - 0, 0, - label_bkg, 0, - 0, &_rcb_checkerboard, - _rcp_bg._label, &_rcp_bg, - label_bdr, 0, - 0, &_rcb_canb, - 0, &_rcb_bord, - 0, &_rcb_shad, - _rcp_bord._label, &_rcp_bord, - label_dsp, 0, - 0, &_rcb_antialias, + label_gen, 0, + 0, &_rum_deflt, + //label_col, 0, + //_rcp_bg._label, &_rcp_bg, + 0, 0, + label_for, 0, + 0, &_page_sizer, + 0, 0, + &_rcb_doc_props_left, &_rcb_doc_props_right, }; + attach_all(_page_page->table(), widget_array, G_N_ELEMENTS(widget_array),0,1); + _rcp_bg_col.pack_start(*_rcp_bg._label, false, false, 2); + _rcp_bg_col.pack_start(_rcp_bg, false, false, 2); + Gtk::Widget *const widget_array_left[] = + { + label_bkg, 0, + 0, &_rcb_checkerboard, + 0, &_rcp_bg_col, + label_dsp, 0, + 0, &_rcb_antialias, + }; + + attach_all(_rcb_doc_props_left, widget_array_left, G_N_ELEMENTS(widget_array_left),0,1); + _rcp_bord_col.pack_start(*_rcp_bord._label, false, false, 2); + _rcp_bord_col.pack_start(_rcp_bord, false, false, 2); + Gtk::Widget *const widget_array_right[] = + { + label_bdr, 0, + 0, &_rcb_canb, + 0, &_rcb_bord, + 0, &_rcb_shad, + 0, &_rcp_bord_col, + }; + + attach_all(_rcb_doc_props_right, widget_array_right, G_N_ELEMENTS(widget_array_right),0,1, true); + std::list<Gtk::Widget*> _slaveList; _slaveList.push_back(&_rcb_bord); _slaveList.push_back(&_rcb_shad); + _slaveList.push_back(&_rcp_bord_col); _rcb_canb.setSlaveWidgets(_slaveList); attach_all(_page_page->table(), widget_array, G_N_ELEMENTS(widget_array),0,1); diff --git a/src/ui/dialog/document-properties.h b/src/ui/dialog/document-properties.h index 8d1c6b38a..fe0e1864e 100644 --- a/src/ui/dialog/document-properties.h +++ b/src/ui/dialog/document-properties.h @@ -117,6 +117,10 @@ protected: UI::Widget::Registry _wr; //--------------------------------------------------------------- + Gtk::Grid _rcb_doc_props_left; + Gtk::Grid _rcb_doc_props_right; + Gtk::Box _rcp_bg_col; + Gtk::Box _rcp_bord_col; UI::Widget::RegisteredCheckButton _rcb_antialias; UI::Widget::RegisteredCheckButton _rcb_checkerboard; UI::Widget::RegisteredCheckButton _rcb_canb; diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp index bb88536d5..3ec6a2b9f 100644 --- a/src/ui/widget/page-sizer.cpp +++ b/src/ui/widget/page-sizer.cpp @@ -225,7 +225,7 @@ PageSizer::PageSizer(Registry & _wr) _marginBottom( _("Botto_m:"), _("Bottom margin"), "fit-margin-bottom", _wr), _lockMarginUpdate(false), _scaleX(_("Scale _x:"), _("Scale X"), "scale-x", _wr), - _scaleY(_("Scale _y:"), _("Scale Y"), "scale-y", _wr), + _scaleY(_("Scale _y:"), _("While SVG allows non-uniform scaling it is recommended to use only uniform scaling in Inkscape. To set a non-uniform scaling, set the 'viewBox' directly."), "scale-y", _wr), _lockScaleUpdate(false), _viewboxX(_("X:"), _("X"), "viewbox-x", _wr), _viewboxY(_("Y:"), _("Y"), "viewbox-y", _wr), @@ -416,13 +416,9 @@ PageSizer::PageSizer(Registry & _wr) _scaleTable.attach(_scaleY, 1, 0, 1, 1); _scaleTable.attach(_scaleLabel, 2, 0, 1, 1); - _scaleTable.attach(_scaleWarning, 0, 1, 2, 1); _viewboxExpander.set_hexpand(); _viewboxExpander.set_vexpand(); _scaleTable.attach(_viewboxExpander, 0, 2, 2, 1); - - _scaleWarning.set_label(_("While SVG allows non-uniform scaling it is recommended to use only uniform scaling in Inkscape. To set a non-uniform scaling, set the 'viewBox' directly.")); - _scaleWarning.set_line_wrap( true ); _viewboxExpander.set_use_underline(); _viewboxExpander.set_label(_("_Viewbox...")); diff --git a/src/ui/widget/page-sizer.h b/src/ui/widget/page-sizer.h index d0655fb0e..f84f96782 100644 --- a/src/ui/widget/page-sizer.h +++ b/src/ui/widget/page-sizer.h @@ -238,7 +238,6 @@ protected: Gtk::Grid _scaleTable; Gtk::Label _scaleLabel; - Gtk::Label _scaleWarning; RegisteredScalar _scaleX; RegisteredScalar _scaleY; bool _lockScaleUpdate; |
