🏗 Sync titlebar button appearance with GTK CSD apps
Currently GTK applications with Client Side Decorations always use decorations from the respected GTK CSS theme. Because of CSS nature different themes may handle decorations in the headerbars differently, therefore making modifying them via user css a very hard task. However, what we can do is to use decoration appearance syncing in our own theme - Breeze GTK.
Breeze GTK uses svg images for the representation of decoration buttons (close, minimize, maximize) appearance. So to achieve the goal what we do is the following:
- We ask KWin to render current decoration buttons to custom QPainters. For each button we must export every state (clicked, hovered, normal, inactive).
- QPainters then export decoration buttons to svg's.
- Then we save those images to assets folder in
- Then we create custom .css for Breeze GTK, that tells the theme to use these saved images for decorations.
🧪 Test Plan
Check if the assets are generated in the
⛓ Depends on
decorations.cssonly if the current GTK theme is Breeze
- Export inactive buttons states