GNOME Bugzilla – Bug 698540
[regression] Combo boxes "popup-fixed-width" property is broken
Last modified: 2018-04-15 00:01:26 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.
Changing title to reflect the problem more accurately, "popup-fixed-width" is actually default behaviour though.
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.
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