diff options
| author | Alexander Valavanis <valavanisalex@gmail.com> | 2017-07-06 15:40:26 +0000 |
|---|---|---|
| committer | Alexander Valavanis <valavanisalex@gmail.com> | 2017-07-06 15:40:26 +0000 |
| commit | 3c2b7df1b8e6b89305380548c5f33c9120cb5161 (patch) | |
| tree | a295efe8d8acfd604903b0e0e734389999626f87 /src | |
| parent | http: Migrate to new LibSoup API (diff) | |
| download | inkscape-3c2b7df1b8e6b89305380548c5f33c9120cb5161.tar.gz inkscape-3c2b7df1b8e6b89305380548c5f33c9120cb5161.zip | |
Gtkmm deprecation fixes
Diffstat (limited to 'src')
| -rw-r--r-- | src/ui/dialog/objects.cpp | 39 | ||||
| -rw-r--r-- | src/ui/dialog/objects.h | 14 | ||||
| -rw-r--r-- | src/ui/dialog/text-edit.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/text-edit.h | 6 | ||||
| -rw-r--r-- | src/ui/widget/page-sizer.cpp | 54 | ||||
| -rw-r--r-- | src/ui/widget/page-sizer.h | 6 |
6 files changed, 59 insertions, 62 deletions
diff --git a/src/ui/dialog/objects.cpp b/src/ui/dialog/objects.cpp index 4b673b8b7..8df515714 100644 --- a/src/ui/dialog/objects.cpp +++ b/src/ui/dialog/objects.cpp @@ -1651,19 +1651,17 @@ ObjectsPanel::ObjectsPanel() : _clipmaskHeader(C_("Clip and mask", "CM")), _highlightHeader(C_("Highlight", "HL")), _nameHeader(_("Label")), - _composite_vbox(false, 0), - _opacity_vbox(false, 0), + _composite_vbox(Gtk::ORIENTATION_VERTICAL), + _opacity_vbox(Gtk::ORIENTATION_VERTICAL), _opacity_label(_("Opacity:")), _opacity_label_unit(_("%")), _opacity_adjustment(Gtk::Adjustment::create(100.0, 0.0, 100.0, 1.0, 1.0, 0.0)), _opacity_hscale(_opacity_adjustment), _opacity_spin_button(_opacity_adjustment, 0.01, 1), _fe_cb(UI::Widget::SimpleFilterModifier::BLEND), - _fe_vbox(false, 0), - _fe_alignment(1, 1, 1, 1), + _fe_vbox(Gtk::ORIENTATION_VERTICAL), _fe_blur(UI::Widget::SimpleFilterModifier::BLUR), - _blur_vbox(false, 0), - _blur_alignment(1, 1, 1, 1), + _blur_vbox(Gtk::ORIENTATION_VERTICAL), _colorSelectorDialog("dialogs.colorpickerwindow") { //Create the tree model and store @@ -1800,16 +1798,33 @@ ObjectsPanel::ObjectsPanel() : //Set up the compositing items //Blend mode filter effect _composite_vbox.pack_start(_fe_vbox, false, false, 2); - _fe_alignment.set_padding(0, 0, 4, 0); - _fe_alignment.add(_fe_cb); - _fe_vbox.pack_start(_fe_alignment, false, false, 0); + + _fe_cb.set_halign(Gtk::ALIGN_FILL); + _fe_cb.set_valign(Gtk::ALIGN_END); + +#if WITH_GTKMM_3_12 + _fe_cb.set_margin_start(4); +#else + _fe_cb.set_margin_left(4); +#endif + + _fe_vbox.pack_start(_fe_cb, false, false, 0); _blendConnection = _fe_cb.signal_blend_blur_changed().connect(sigc::mem_fun(*this, &ObjectsPanel::_blendValueChanged)); //Blur filter effect _composite_vbox.pack_start(_blur_vbox, false, false, 2); - _blur_alignment.set_padding(0, 0, 4, 0); - _blur_alignment.add(_fe_blur); - _blur_vbox.pack_start(_blur_alignment, false, false, 0); + + _fe_blur.set_hexpand(); + _fe_blur.set_halign(Gtk::ALIGN_FILL); + _fe_blur.set_valign(Gtk::ALIGN_END); + +#if WITH_GTKMM_3_12 + _fe_blur.set_margin_start(4); +#else + _fe_blur.set_margin_left(4); +#endif + + _blur_vbox.pack_start(_fe_blur, false, false, 0); _blurConnection = _fe_blur.signal_blend_blur_changed().connect(sigc::mem_fun(*this, &ObjectsPanel::_blurValueChanged)); //Opacity diff --git a/src/ui/dialog/objects.h b/src/ui/dialog/objects.h index 21305669e..b7fd1b4f8 100644 --- a/src/ui/dialog/objects.h +++ b/src/ui/dialog/objects.h @@ -153,21 +153,19 @@ private: Gtk::Label _nameHeader; /* Composite Settings */ - Gtk::VBox _composite_vbox; - Gtk::VBox _opacity_vbox; - Gtk::HBox _opacity_hbox; + Gtk::Box _composite_vbox; + Gtk::Box _opacity_vbox; + Gtk::Box _opacity_hbox; Gtk::Label _opacity_label; Gtk::Label _opacity_label_unit; Glib::RefPtr<Gtk::Adjustment> _opacity_adjustment; - Gtk::HScale _opacity_hscale; + Gtk::Scale _opacity_hscale; Inkscape::UI::Widget::SpinButton _opacity_spin_button; Inkscape::UI::Widget::SimpleFilterModifier _fe_cb; - Gtk::VBox _fe_vbox; - Gtk::Alignment _fe_alignment; + Gtk::Box _fe_vbox; Inkscape::UI::Widget::SimpleFilterModifier _fe_blur; - Gtk::VBox _blur_vbox; - Gtk::Alignment _blur_alignment; + Gtk::Box _blur_vbox; Gtk::Dialog _colorSelectorDialog; boost::scoped_ptr<Inkscape::UI::SelectedColor> _selectedColor; diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp index c7d899f45..f6b2305b1 100644 --- a/src/ui/dialog/text-edit.cpp +++ b/src/ui/dialog/text-edit.cpp @@ -58,7 +58,6 @@ namespace Dialog { TextEdit::TextEdit() : UI::Widget::Panel("", "/dialogs/textandfont", SP_VERB_DIALOG_TEXT), font_label(_("_Font"), true), - layout_frame(), text_label(_("_Text"), true), vari_label(_("_Variants"), true), setasdefault_button(_("Set as _default")), @@ -128,7 +127,6 @@ TextEdit::TextEdit() preview_label.set_line_wrap(FALSE); font_vbox.pack_start(fontsel_hbox, true, true); - font_vbox.pack_start(layout_frame, false, false, VB_MARGIN); font_vbox.pack_start(preview_label, true, true, VB_MARGIN); /* Text tab */ diff --git a/src/ui/dialog/text-edit.h b/src/ui/dialog/text-edit.h index 1fc0099fb..35b051b6f 100644 --- a/src/ui/dialog/text-edit.h +++ b/src/ui/dialog/text-edit.h @@ -22,7 +22,6 @@ # include <config.h> #endif -#include <gtkmm/alignment.h> #include <gtkmm/box.h> #include <gtkmm/notebook.h> #include <gtkmm/button.h> @@ -190,11 +189,10 @@ private: Gtk::VBox font_vbox; Gtk::Label font_label; - Gtk::HBox fontsel_hbox; + Gtk::Box fontsel_hbox; SPFontSelector *fsel; - Gtk::Alignment layout_frame; - Gtk::HBox layout_hbox; + Gtk::Box layout_hbox; Gtk::RadioButton align_left; Gtk::RadioButton align_center; Gtk::RadioButton align_right; 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; |
