applets/kicker: make submenu follow layoutDirection
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
- Start plasmashell with
plasmashell --reverse
. (plasmawindowed
does not place the menus correctly) - 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).
- Open kicker and mouse over a menu entry
- Without patch: submenu opens to the right
- With patch: submenu opens to the left
Screenshots or screen recordings
Before | 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.