Replies: 4 comments 6 replies
-
Of course the struggle with chrome is not nice when you scroll and hover the menu entry there needs to be a delay like in vs code, that not every sub menu will show up immediately. |
Beta Was this translation helpful? Give feedback.
-
So the improvement should be added to:
|
Beta Was this translation helpful? Give feedback.
-
The best solution is probably group items into submenus (except for those expected to be used very frequently). I believe this can be done in the NetBeans branding files even for menu items that belong to plugins. Another fallback strategy could be to reduce the spacing between menu items if necessary. Scrolling should probably be a last resort. Either of these fallback strategies would probably have to be implemented upstream in the FlatLAF library. On MacOS, I don't think we have control over menus; they are provided by the OS. |
Beta Was this translation helpful? Give feedback.
-
Hello, I've good news 😄 FlatLaf automatically adds scrolling to any menu, if it does not fit on the screen. https://github.com/JFormDesigner/FlatLaf/releases/tag/2.1 It works similar to macOS, Firefix, Chrome, etc:
You can try it out in the FlatLaf Demo (menu "View > Scrolling Popup Menu") Here is the commit that adds menu scrolling: JFormDesigner/FlatLaf@fef6ae7 Also had some problems to make this work. Caused me some headaches... |
Beta Was this translation helpful? Give feedback.
-
With more and more plugins adding new entries to menus (new menu items) adding more actions to the context menu of files/folders/projects, adding more action entries to opened tabs or editors itself adding more entries to the quick search and also the list of opened files (show opened documents list it is needed to not grow those JPanes to the maximum. Because 1. it is not user friendly to have a context menu with 1000 entries and show them all. It is also up to the plugin authors to group them. 2. if there is no maximum size, it will grow to unlimitied size and with go over the viewport so you can't reach each entry. For this. VS Code and also Chrome have a nice solution. They set a fixed size to the context menu and the rest will be scrollable. VS Code also for menu entries.
Chrome Context Menu
VS Code Menues
In general no onw should be disturbed by this improvement because if you have enough space and not a lot of plugins you not notice it.
I already had a look into this and I know the place where I wanted to implemented it but I got stuck because all of it will be generated dynamically. My solution was to add a JScrollPane to each menu entry with all items. The code for this is here: \netbeans\platform\openide.loaders\src\org\openide\awt\MenuBar.java somwhere there I tried to implement it and I had some luck but my knowledge is a bit low so I would like to get help by implementing this or maybe flat laf has already thouhgt about because I dunno whether this will be better a FlatLaF feature or a core NetBeans feature.
Please let discuss about this :) @DevCharly @neilcsmith-net @eirikbakke
Beta Was this translation helpful? Give feedback.
All reactions