GNOME Bugzilla – Bug 622938
Blank space at the top when opening the combo box
Last modified: 2020-11-15 19:33:19 UTC
Created attachment 164742 [details] screenshot This happens only with GtkComboBox, and not GtkComboBoxEntry. There is a scenario in which when you open the combo box you'll get a blank space it the top. This is beacause the first entry of the combo box items is placed just below the main widget, while the menu background is expanded accordingly to the number of items. The result is really unpleasant to see.
Note: in the screenshot there is also a GtkComboBoxEntry, just ignore it.
A current example of this is in time-admin ("Administration" > Time and Date"), if you set your time zone to "Africa/Abidjan" and then reopen the menu. GTK radio menus are faster to use than those than their equivalents in Qt or Windows, because they open with the currently selected item under the pointer, the previous item immediately above, and the next item immediately below. It is much more common to want to choose an item near the current selection than an item near the beginning of the menu, so this minimizes pointer movement. The drawback is that when there are more items after the current selection than will fit between the menu control and the bottom of the screen, the menu needs to either (1) open with an empty space at the top (as shown in the screenshot), ready to fill with items if you auto-scroll the menu, or (2) enlarge the window from the top smoothly as you auto-scroll. GTK currently does #1; it could do #2 instead, but that might be difficult to implement.
*** Bug 648452 has been marked as a duplicate of this bug. ***
*** Bug 680593 has been marked as a duplicate of this bug. ***
Marking as duplicate of the older bug, in which I'm also imagining a potential approach, UX-wise. *** This bug has been marked as a duplicate of bug 374871 ***