From b2b013b1cce5a39a532c9a822b4f30ee1ca54c0e Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Wed, 8 Mar 2017 23:42:43 +0100 Subject: Repair functionality broken by Alex Valvani's "Gtk+ 3 deprecation fixes" (see in r15547 [1]) Gtk::Label::set_halign() is *not* the same as Gtk::Label::set_xalign() or the deprecated Gtk::Label::set_alignment() The former sets the alignment of the widget itself while the latter two set the alignment of the text within the widget's size allocation. Is it really more important to eradicate deprecations then to have working code? http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/15547 (bzr r15580) --- src/extension/param/description.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/extension/param/description.cpp') diff --git a/src/extension/param/description.cpp b/src/extension/param/description.cpp index d0698a00e..f0a4abdae 100644 --- a/src/extension/param/description.cpp +++ b/src/extension/param/description.cpp @@ -87,8 +87,11 @@ ParamDescription::get_widget (SPDocument * /*doc*/, Inkscape::XML::Node * /*node label->set_text(newguitext); } label->set_line_wrap(); - //label->set_xalign(0); // requires gtkmm 3.16 - label->set_halign(Gtk::ALIGN_START); +#if GTK_CHECK_VERSION(3,16,0) + label->set_xalign(0); +#else + label->set_alignment(Gtk::ALIGN_START); +#endif // TODO: Ugly "fix" for gtk3 width/height calculation of labels. // - If not applying any limits long labels will make the window grow horizontally until it uses up -- cgit v1.2.3