Bug 492567

Summary: Add resource support for "menu" and "appmenu" buttons for SVG based themes
Product: [Plasma] kwin Reporter: Fabian Hoffmann <fab1997>
Component: auroraeAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: minor Keywords: junior-jobs
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
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

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.