GNOME Bugzilla – Bug 153829
GtkComboEntry menu spans entire screen if the list is big
Last modified: 2014-03-24 03:03:22 UTC
If the list is big, GtkComboEntry has the following problems: a) Even if the parent dialog/window is small, the list spawns entire screen. This looks odd. Since the arrow buttons are anyway there (to scroll the list), probably the menu window size can be resrictied to the size of the parent dialog/window. b) The top or botton portion of list is blank, depending on the position of the menu item currently selected. This also looks very odd. For example, there can be a situation where entire top portion of the menu looks blank if user selects the first item in the list. Please have a look at the attached screenshot, which shows both the problems.
Created attachment 31974 [details] screenshot showing the problem
For the "blank area", see bug 129463 and referenced. Clamping to the parent dialog is almost certainly wrong ... imagine a very short toplevel with a dropdown. I don't know if some MAX (SOME_MULTIPLE_OF_FONT_HEIGHT, WINDOW_HEIGHT) would make sense.
Created attachment 36644 [details] [review] Patch fixes the bug. This patch restricts menu being drawn beyond height of the screen, i.e check if sum of height (lenght) of menuitems and the height co-ordinate (y-axis) of start of the optionmenu exceeds the screen height, if it exceeds then set y-axis co-ordinate to the screen heigth - height of the menu. so that menu displayed is from the that co ordinate.
closing out ancient bugs