PC3.Menu: Fix background legibility and positioning issues

ISSUE BEING SOLVED

I was pointed to a legibility issue with the PlasmaComponents3 Menu as seen in the panel configuration dialog. The source of the issue is that the menu uses widgets/background SVG for its background. With transparent(ish) themes this SVG is transparent. Since there is no blur behind the popup, this results in hard to read text when there is background interference.

PROPOSED SOLUTION

To solve it I propose to use a different SVG -> solid/tooltip. Why this one and not some others? First, we don't have an SVG for menus. The second closest thing are the tooltip SVGs, since tooltips are also inherently popups like menus. The solid tooltip SVGs are also already used in PC3.Tooltip and up-to-date Plasma themes posses them.

TECHNICAL BACKGROUND

This background change is mostly a copy-paste of how PC3.Tooltip handles it. The change dragged positioning fixes along with it; I had to adjust the padding code which stopped working and I also made the popup aligned with the button's right edge while I was at it. As can be seen in the MR screenshots, the old code didn't take SVG margins into account so the popup is badly positioned relative to the button with some themes.

SCREENSHOTS

Air (before) Air (after)
PC3Menu-Air-b4 PC3Menu-Air
Breeze (before) Breeze (after)
PC3Menu-Breeze-b4 PC3Menu-Breeze

NOTE! Breeze lacking an outline is a bug with the theme -> the QStyle uses an outline on tooltips so the SVG should be updated to be consistent with it

ChromeOS (before) ChromeOS (after)
PC3Menu-ChromeOS-b4 PC3Menu-ChromeOS
Darkly (before) Darkly (after)
PC3Menu-Darkly-b4 PC3Menu-Darkly
Gently (before) Gently (after)
PC3Menu-Gently-b4 PC3Menu-Gently
Layan (before) Layan (after)
PC3Menu-Layan-b4 PC3Menu-Layan
Oxygen (before) Oxygen (after)
PC3Menu-Oxygen-b4 PC3Menu-Oxygen
Edited by Filip Fila

Merge request reports

Loading