Skip to content

applets/kicker: make submenu follow layoutDirection

Christoph Wolk requested to merge cwo/plasma-workspace:kicker_menu_rtl into master

Reason for the change

When Kicker opens a cascading submenu, it always tries to open the submenu to the right. This is contrary to the regular menu behavior in KDE applications, where submenus open in reading direction (as specified by layoutDirection, and against the submenu indicator arrow on the menu item.

This change makes kicker open the submenu in reading direction first if there is enough space.

Test plan

  1. Start plasmashell with plasmashell --reverse. (plasmawindowed does not place the menus correctly)
  2. Make sure there is a kicker widget on a panel, with enough space toward both the left and the right (ideally in the center of the panel).
  3. Open kicker and mouse over a menu entry
  4. Without patch: submenu opens to the right
  5. With patch: submenu opens to the left

Screenshots or screen recordings

Before After
kicker_submenu_before kicker_submenu_after

Bugs fixed

N/A

Notes

i18n bugfix, so proposing for cherrypicking into 6.3

I'm not too experienced with c++ and I think this is my first non-trivial patch in it, so feedback welcome.

Merge request reports

Loading