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 698540 - [regression] Combo boxes "popup-fixed-width" property is broken
[regression] Combo boxes "popup-fixed-width" property is broken
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkComboBox
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-04-22 06:25 UTC by Tristan Van Berkom
Modified: 2018-04-15 00:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tristan Van Berkom 2013-04-22 06:25:38 UTC
Normally comboboxes are supposed to have the popup treemenu popup at the
allocated width of the combo-box itself, this helps the UI look consistent
by not having the combo box's meny overlap any widgets on the left or right
of the combo.

Now it seems they are popping up at a different width.

This is visible why running ./tests/testheightforwidth and
popping up the "Combo Boxes and Menus" test.
Comment 1 Tristan Van Berkom 2013-04-28 21:18:16 UTC
Changing title to reflect the problem more accurately,
"popup-fixed-width" is actually default behaviour though.
Comment 2 Daniel Boles 2017-08-30 12:34:50 UTC
Is this still reproducible?


(In reply to Tristan Van Berkom from comment #0)
> Now it seems they are popping up at a different width.

Were they wider or narrower than the button?


> This is visible why running ./tests/testheightforwidth and
> popping up the "Combo Boxes and Menus" test.

This looks fine to me; the popup is the same width as the button. So, I guess it's obsolete?


fwiw, the code does this:

              if (priv->popup_fixed_width)
                gtk_widget_get_preferred_width (priv->popup_widget, &menu_width, NULL);
              else
                gtk_widget_get_preferred_width (priv->popup_widget, NULL, &menu_width);

              gtk_widget_set_size_request (priv->popup_widget,
                                           MAX (allocation->width, menu_width), -1);

which basically says that in all cases, the menu is at least as wide as the box, but it can get wider up to its min-width if :popup-fixed-width but its nat-width if not.

That seems like a very subtle difference, so the property doesn't seem tremendously useful... In no case can the menu be smaller than the button, and it either case it might be wider if its contents demand so.
Comment 3 Matthias Clasen 2018-04-15 00:01:26 UTC
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla.

If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab:

https://gitlab.gnome.org/GNOME/gtk/issues/new