KStandardAction::showMenubar and native menubars
Albert Astals Cid
aacid at kde.org
Tue Oct 11 22:05:30 UTC 2016
On platforms with native menubars (Mac, Unity) the showMenuBar action makes no sense since
the menubar is integrated in the desktop shell instead of the application so the application gains
no space by hiding/showing the menubar (sometimes it isn't possible to hide it at all)
So on thos platforms havign a menu item that does virtually nothing is bad and can be a little
disconcerting.
I was thinking if we could somehow fix it centrally in frameworks instead of patching every app
that has a KStandardAction::showMenubar
My current (yet to implement/test) idea is have KStandardAction::showMenubar check all the
menubars of the top level windows of the app and if they are all marked as native, then return a
dummy QAction that is not inserted in the menubar/actionCollection and that already returns
"true" for checked.
This way the app thinks it got a real action to control the menubar status, but it is never shown
to the user.
What do you think, do you think it could work or it is trying to be too smart and it'll break
somehow?
Cheers,
Albert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20161012/bde74ba9/attachment.html>
More information about the Kde-frameworks-devel
mailing list