sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
814 stars 40 forks source link

Syntax selection menu does not scroll (GTK) #4349

Open romuald opened 3 years ago

romuald commented 3 years ago

Description

The syntax selection tool (either from the "bottom" UI or the top menu), does not allow user to scroll it.

Steps to reproduce

  1. Start Sublime Text in safe mode
  2. Click on View > Syntax menu
  3. In case the menu is larger than the screen. The UI does not allow to scroll it, and thus elements are not available to select using the mouse (they are using the keyboard but we cannot see what element is selected)

Expected behavior

The menu should be scrollable in some way to allow access to the bottom elements

Actual behavior

The bottom elements aren't visible or accessible

Here is a screenshot screenshot

Environment

deathaxe commented 3 years ago

Those menus are native OS menus. Shouldn't it be handled by GTK?

romuald commented 3 years ago

@deathaxe I've made a quick test using python / GTK and the menu is scrollable on the same system

I know very little about GTK so maybe there is different kind of menus

Here is my example:

#!/usr/bin/python3

def main():
    from gi import pygtkcompat
    pygtkcompat.enable_gtk(version='3.0')

    import gtk

    menu = gtk.Menu()

    items = [gtk.MenuItem(str(i)) for i in range(80)]

    for item in items:
        menu.append(item)
        item.show()

    menu.connect('hide', gtk.main_quit)
    menu.connect('key-release-event', gtk.main_quit)

    menu.popup(parent_menu_shell=None,
               parent_menu_item=None,
               func=None,
               data=None,
               button=1,
               activate_time=0)

    gtk.main()

if __name__ == '__main__':
    main()