diff options
Diffstat (limited to 'src/ui/widget')
| -rw-r--r-- | src/ui/widget/page-sizer.cpp | 54 | ||||
| -rw-r--r-- | src/ui/widget/page-sizer.h | 6 |
2 files changed, 24 insertions, 36 deletions
diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp index 081300b9e..bb88536d5 100644 --- a/src/ui/widget/page-sizer.cpp +++ b/src/ui/widget/page-sizer.cpp @@ -374,37 +374,31 @@ PageSizer::PageSizer(Registry & _wr) _marginTable.set_row_spacing(4); _marginTable.set_column_spacing(4); - _marginTopAlign.set_hexpand(); - _marginTopAlign.set_vexpand(); - _marginTable.attach(_marginTopAlign, 0, 0, 2, 1); - - _marginLeftAlign.set_hexpand(); - _marginLeftAlign.set_vexpand(); - _marginTable.attach(_marginLeftAlign, 0, 1, 1, 1); - - _marginRightAlign.set_hexpand(); - _marginRightAlign.set_vexpand(); - _marginTable.attach(_marginRightAlign, 1, 1, 1, 1); - - _marginBottomAlign.set_hexpand(); - _marginBottomAlign.set_vexpand(); - _marginTable.attach(_marginBottomAlign, 0, 2, 2, 1); - - _fitPageButtonAlign.set_hexpand(); - _fitPageButtonAlign.set_vexpand(); - _marginTable.attach(_fitPageButtonAlign, 0, 3, 2, 1); - - _marginTopAlign.set(0.5, 0.5, 0.0, 1.0); - _marginTopAlign.add(_marginTop); - _marginLeftAlign.set(0.0, 0.5, 0.0, 1.0); - _marginLeftAlign.add(_marginLeft); - _marginRightAlign.set(1.0, 0.5, 0.0, 1.0); - _marginRightAlign.add(_marginRight); - _marginBottomAlign.set(0.5, 0.5, 0.0, 1.0); - _marginBottomAlign.add(_marginBottom); + _marginTop.set_halign(Gtk::ALIGN_CENTER); + _marginTop.set_hexpand(); + _marginTop.set_vexpand(); + _marginTable.attach(_marginTop, 0, 0, 2, 1); + + _marginLeft.set_halign(Gtk::ALIGN_START); + _marginLeft.set_hexpand(); + _marginLeft.set_vexpand(); + _marginTable.attach(_marginLeft, 0, 1, 1, 1); + + _marginRight.set_halign(Gtk::ALIGN_END); + _marginRight.set_hexpand(); + _marginRight.set_vexpand(); + _marginTable.attach(_marginRight, 1, 1, 1, 1); + + _marginBottom.set_halign(Gtk::ALIGN_CENTER); + _marginBottom.set_hexpand(); + _marginBottom.set_vexpand(); + _marginTable.attach(_marginBottom, 0, 2, 2, 1); + + _fitPageButton.set_halign(Gtk::ALIGN_CENTER); + _fitPageButton.set_hexpand(); + _fitPageButton.set_vexpand(); + _marginTable.attach(_fitPageButton, 0, 3, 2, 1); - _fitPageButtonAlign.set(0.5, 0.5, 0.0, 1.0); - _fitPageButtonAlign.add(_fitPageButton); _fitPageButton.set_use_underline(); _fitPageButton.set_label(_("_Resize page to drawing or selection (Ctrl+Shift+R)")); _fitPageButton.set_tooltip_text(_("Resize the page to fit the current selection, or the entire drawing if there is no selection")); diff --git a/src/ui/widget/page-sizer.h b/src/ui/widget/page-sizer.h index f1966f848..d0655fb0e 100644 --- a/src/ui/widget/page-sizer.h +++ b/src/ui/widget/page-sizer.h @@ -20,7 +20,6 @@ #include "util/units.h" -#include <gtkmm/alignment.h> #include <gtkmm/expander.h> #include <gtkmm/frame.h> #include <gtkmm/grid.h> @@ -227,15 +226,10 @@ protected: Gtk::Expander _fitPageMarginExpander; Gtk::Grid _marginTable; - Gtk::Alignment _marginTopAlign; - Gtk::Alignment _marginLeftAlign; - Gtk::Alignment _marginRightAlign; - Gtk::Alignment _marginBottomAlign; RegisteredScalar _marginTop; RegisteredScalar _marginLeft; RegisteredScalar _marginRight; RegisteredScalar _marginBottom; - Gtk::Alignment _fitPageButtonAlign; Gtk::Button _fitPageButton; bool _lockMarginUpdate; |
