-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Fix #15473: No platform menu bar support on Linux #15826
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for you contribution! A few comments.
e0e676a
to
2a153f5
Compare
… Linux Both AppMenuModel and NavigableAppMenuModel has to be exposed to QML on Linux to allow GUI menu bar and platform menu bar support.
Required for checking if global menu bar is available.
Currently provides isGlobalMenuAvailable() method that uses DBus to check whether it is enabled
Uses Loader components to make only one of the menu bars active.
@adazem009 Great! In order for the unit tests to be successful, could you please update with the master |
The unit test failure is also on the latest master branch, but only sometimes. I still need to clean that up... I've restarted the check for now, let's see whether it passes this time :) |
… macOS Using AppMenuModel for GUI menu bar and PlatformAppMenuModel for platform menu bar makes more sense when both menu bar types are possible on a platform
Unit tests are successful now. |
@cbjeukendrup do you have any other suggestions? or is it ready for merge? :) |
It's ready for merge. I've already tested it on Windows and macOS just to be sure that it doesn't break anything. |
It's probably okay, but I'll quickly check it later today! |
@cbjeukendrup I don't have KDE Plasma. I have only Ubuntu and Mint and as I know it's not easy to enable Global menu there.. I've tested this PR on Win10,Mac13 and Linux Mint and didn't found any differences with master. So, if it's safe we can merge it to master. |
Thanks for checking! In that case I'll merge it. |
Great. Thanks! |
Resolves: #15473
Native menu bar support is only implemented for macOS. This pull request contains changes that will enable it on Linux-based systems as well (for example the global menu bar in KDE Plasma).
Uses D-Bus (com.canonical.AppMenu.Registrar) to check whether global menu is available.
I've tested this in KDE Plasma and it properly detects whether global menu is enabled.