Skip to content

Introduce KHamburgermenu

Felix Ernst requested to merge (removed):khamburgermenu into master

This commit introduces the hamburger menu, which is a general menu button, to frameworks. It substitutes the menu bar meaning that it will act non- existent when the menu bar is visible. When there is no menu bar or it is hidden, the KHamburgerMenu will take on all of its responsibilities. I mean for this KHamburgerMenu to be used in all applications that have a menu bar but allow to hide it (or have it hidden by default).

The hamburger menu is supposed to only feature actions which are not already visible to the user in other parts of the UI. Methods are available to make it aware of toolbars, menus, etc.

When both the menu bar and toolbar(s) are hidden, users might find themselves in a situation they do not know how to recover from. To avoid this, KHamburgerMenu is supposed to be added to context menus where it will only be visible when no other menu is available.

The menu also features a special sub-menu advertising actions which are only available through the menu bar and would crowd the hamburger menu.

CCBUG: 368421

(The "For 34 more actions:"-action from second 44 onwards was changed. See the second video below for the current state of that sub-menu.) 2020-10-05_17-50-25


Test plan:

  • Read the class usage description in khamburgermenu.h (contains design decisions and API usage examples)
  • Build and install
  • Either:
    • Try to add a hamburger menu to an application that needs one (Okular, Gwenview, Ark, Filelight, ...) and tell me if something went wrong or is unintuitive. This is the best API feedback I can get and adding a hamburger menu is a good idea anyway imo!
    • Use system/dolphin!71 (merged) which is how I test these changes. (I also tested with GwenView which worked as expected but didn't upload that code.)
Edited by Felix Ernst

Merge request reports