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 767076 - GtkGrid strange behavior with GtkSizeGroup
GtkGrid strange behavior with GtkSizeGroup
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-05-31 15:04 UTC by Carlos Garnacho
Modified: 2016-06-01 13:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
testcase (1.04 KB, text/plain)
2016-05-31 15:04 UTC, Carlos Garnacho
Details

Description Carlos Garnacho 2016-05-31 15:04:04 UTC
Created attachment 328811 [details]
testcase

In the attached testcase there's two labels (it can be any other widget really) attached through a GtkSizeGroup. One of the labels is shown, and the other is initially hidden, but can be toggled visible/invisible.

As GtkSizeGroup uses to work, I'd expect the grid to initially grant only space for the first label, but the label should be requesting enough height to avoid global height changes when the second label is shown. When the second label is shown, the grid should only require changes in width to accommodate the extra widget which should be as wide and high as the other label.

However, when running the testcase, it seems the first label gets just enough space to be visible itself, and the second label gets a similar allocation, but not accounting for the height overall, so the second label is rendered outside its allocation.

Even funkier, making the inspector appear makes the widgets snap into the right sizes.
Comment 1 Matthias Clasen 2016-06-01 13:44:52 UTC
We tracked this down to GtkSizeGroup::ignore-hidden being broken. That has been documented, and the property has been deprecated. Sadly, not fix.