GTK3: 'Layers' dialog too wide (not related to actual content)

Bug #1069181 reported by su_v on 2012-10-20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Alex Valavanis

Bug Description

With GTK3 builds, the 'Layers' dialog is far too wide (even if one considers the new layout of the spin buttons, this minimal width doesn't make sense).

Reproduced with Inkscape 0.48+devel 11814 on OS X 10.7.4:
- gtk3/x11 3.4.4, gtkmm 3.4.0, glib 2.32.4, glibmm 2.32.1, cairo 1.12.2
- gtk3/quartz 3.6.1, gtkmm 3.5.13, glib 2.34.1, glibmm 2.33.14, cairo 1.12.2

su_v (suv-lp) wrote :
Alex Valavanis (valavanisalex) wrote :

This is probably caused by the removal of the set_child_min_width method from Gtk::ButtonBox in GTK+ 3. In ui/dialog/layers.cpp, we have...

    // TODO: This has been removed from Gtkmm 3.0. Check that everything still
    // looks OK!
    _buttonsRow.set_child_min_width( 16 );

I guess the response to my comment in the code is "no, it doesn't look OK"!

Alex Valavanis (valavanisalex) wrote :

OK, this is a pain... it turns out that GTK+ 3 forces a minimum size of 85x27 px for any child button in a buttonbox. In GTK+ 2 this could be overridden by directly setting the child_min_width/height members of GtkButtonBox but that option has now been removed.

The easiest solution is just to use a Gtk::Box instead of Gtk::ButtonBox. This will set the minimum child width to be just the natural size of the buttons. The disadvantage is that the buttons will (by default) spread apart homogeneously rather than having the +/- buttons tightly together at one side, and the raise/lower/top/bottom buttons tightly together at the other. I guess we could try fiddling about with packing boxes inside boxes to get the same effect.

Alex Valavanis (valavanisalex) wrote :

Should be fixed in lp:inkscape r11823 by using a set of Gtk::Box instead of Gtk::ButtonBox.

Changed in inkscape:
assignee: nobody → Alex Valavanis (valavanisalex)
status: New → Fix Released
su_v (suv-lp) wrote :

> Should be fixed in lp:inkscape r11823

Looks fine on OS X 10.7.4 with GTK+/X11 3.4.4 and GTK+/Quartz 3.6.1. Thx :-)

Alex Valavanis (valavanisalex) wrote :

Here's an upstream report in Gtk+ discussing the inability to shrink the minimum child width in GtkButtonBoxes

tags: added: gtk3
removed: gtk3-regression
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.