New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[linux] Add native menu bar support #54
Comments
The most Flutter-like way to do this is probably to have a MenuBuilder widget (name subject to bikeshedding) that controls an underlying MenuManager class that does the channel communication. Then the menu configuration is set up in the build pipeline the same way as other UI elements. |
Also, just to capture something we discussed out of band: menus get more complex when keyboard shortcuts enter the picture, because keyboard shortcut handling requires coordination with other kinds of input (e.g. IME). So I think this issue is meant to capture menus without shortcuts, and we'll file another issue to track keyboard shortcuts. |
GtkUIManager was deprecated in gtk3 and will be removed in 4. AMTK might prove useful to you, it's recently moved to be part of the tepl project. |
Provides a way for an embedder to add a set of Flutter-controlled top-level menu items to the application menu. Knowns limitations: - No ability to set keyboard shortcuts. - No ability to mix Flutter-controlled and native-controlled items within a top-level menu item. - No handling of special native menus (e.g., the Window menu on macOS). - No ability to interleave Flutter-controlled and native-controlled top-level menus; the Flutter-controlled menus must be a contiguous block. - No handling of anything other than text (check marks, icons, etc.). Future improvements will address some or all of these limitations. Currently implemented on macOS only. Addresses #54 for macOS
Retitling to reflect the remaining scope. |
PR #130 fixed this (in the limited way we can using GLFW); just forgot to close this. |
We'll need to define a protocol on the Dart side for populating and managing native menu bars, and receiving callbacks when they are selected, then implement corresponding plugins for each platform.
On macOS the native side should be relatively straightforward. Currently for Linux it will be tricky, since GLFW doesn't have menu bar support. If the GTK version is working by the time we get to this it'll be much more straightforward, otherwise we can look into a temporary solution like a floating menu window on Linux.
The text was updated successfully, but these errors were encountered: