After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 595741 - No way to set the minimum child widget size of a GtkButtonBox
No way to set the minimum child widget size of a GtkButtonBox
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.17.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2009-09-20 12:49 UTC by Holger Berndt
Modified: 2016-01-24 05:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of oversized buttons in a GtkButtonBox in a docked dialog (104.42 KB, image/png)
2012-10-23 11:43 UTC, Alex Valavanis
Details

Description Holger Berndt 2009-09-20 12:49:19 UTC
There doesn't seem to be any valid way to set the minimum size of a child in a GtkButtonBox.

gtk_button_box_set_child_size() works, but is marked deprecated. The doc advises to use the properties "child-min-width" and "child-min-height" instead, but these two properties are read-only, not read-write.
Comment 1 Christian Dywan 2009-09-21 14:16:36 UTC
The documentation is slightly off here, or maybe just not explicit enough. Those are style properties meant to be used in themes. Although it is possible to work around it, applications shouldn't modify those.

May I ask what your use case is? I fail to find out why this was deprecated with git blame, so I don't know if there was a good reason for that.
Comment 2 Holger Berndt 2009-09-21 14:33:31 UTC
I briefly described the use-case in bug #595742, comment 3 (sorry for the cross-bug-report-confusion).

Brief repetition: I'd like to put a non-obtrusive, minimum size, icon only close button into the bar. One of the kind that is often found in indivudual tabs of tabbed-interfaces, or e.g. to the left of the Firefox search bar.
Comment 3 Alex Valavanis 2012-10-23 11:43:34 UTC
Created attachment 227055 [details]
Screenshot of oversized buttons in a GtkButtonBox in a docked dialog

Just adding my voice to this...

We used to set the min child width in a ButtonBox in a dockable dialog in Inkscape [via the Gtk::ButtonBox::set_child_min_width() method in Gtkmm].  The buttons in question each contained just a compact icon (no text), so we set the min child width to 16 to allow a bunch of them to be neatly arranged horizontally.

Now that the setting has been removed, the fixed min child width of 85 made the dockable dialog so wide that it took up too much of the application window.  The Inkscape bug report is here:

https://bugs.launchpad.net/inkscape/+bug/1069181

I'll upload an image of the dialog containing massive buttons that we'd like to shrink homogeneously.

As a workaround, I just switched to using a GtkBox, but I hope this illustrates a use-case for set_child_min_width
Comment 4 Matthias Clasen 2016-01-24 05:02:39 UTC
we now support min-width and min-height in css