Bug 492567 - Add resource support for "menu" and "appmenu" buttons for SVG based themes
Summary: Add resource support for "menu" and "appmenu" buttons for SVG based themes
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: aurorae (other bugs)
Version First Reported In: unspecified
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2024-09-02 22:58 UTC by Fabian Hoffmann
Modified: 2024-09-28 19:51 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Konsole window with custom theme applied and containing two additional window buttons that are unthemed (3.10 KB, image/png)
2024-09-02 22:58 UTC, Fabian Hoffmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Hoffmann 2024-09-02 22:58:10 UTC
Created attachment 173247 [details]
Konsole window with custom theme applied and containing two additional window buttons that are unthemed

SUMMARY
SVG based aurora window decoration themes are allowed to customise the look of various window buttons via SVG files for each button type. The current implementation internally seems to support themeability for the "menu" and "appmenu" window buttons, but the engine doesn't look for SVG files for these buttons and as such will display default graphics instead. This can be somewhat offputting depending on the theme design. In my case, I have created a theme with a thin titlebar and there the unthemed buttons stick out like a sore thumb.

STEPS TO REPRODUCE
1. Create an aurorae theme that will additionally contain "menu.svg" and "appmenu.svg".
2. Install the theme under "~/.local/share/aurorae/themes/".
3. Open up window decoration settings, activate the theme, add the window buttons "More actions for this window" and "Application Menu" and apply the changes.

OBSERVED RESULT
If an aurorae theme is used that would provide "menu.svg" and "appmenu.svg" files, the buttons for basic window actions and the app menu are displayed but the icon of the application is shown for both of the buttons.

EXPECTED RESULT
The theme engine should also load "menu.svg" and "appmenu.svg" files in a similar manner to the other window buttons.

SOFTWARE/OS VERSIONS
Operating System: Artix Linux 
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.10.6-artix1-1 (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 5950X 16-Core Processor
Memory: 125.7 GiB of RAM
Graphics Processor: AMD Radeon RX 5700

The platform field is marked to be Arch Linux even though I'm running Artix Linux but many packages are served from Arch repos and as such there isn't much of a difference except that I'm running dinit instead of systemd.

ADDITIONAL INFORMATION
Relevant source code:
src/plugins/kdecorations/aurorae/src/lib/auroraetheme.cpp:122
It probably only needs to add two more lines for the rest of the two window buttons.
Comment 1 Fabian Hoffmann 2024-09-28 19:51:07 UTC
There is another bug report that is similar to this one: https://bugs.kde.org/show_bug.cgi?id=404322
I wasn't seeing it when I sent this report. A pull request has been made and pushed that will only add support for the app menu but not for the regular menu. I would love to see support for that one too.