Currently GTK applications with Client Side Decoration 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 images (.svg and .png) for representing decoration
buttons (close, minimize, maximize) appearance. So to achieve the goal
what we can do (hypothetically) is the following:
1. Ask KWin to render current decoration buttons to custom QPainters.
For each button we must export every state (clicked, hovered, normal).
2. QPainters then export decoration buttons to pixmaps or/and svg.
3. Then we will save those images to assets folder in
`~/.config/gtk-3.0/assets` or something like that.
4. Then we will create custom .css for Breeze GTK, that tells the theme
to use these saved images for decorations.
I am currently having trouble with the first part, trying to ask KWin to
do QPainter stuff. Currently it crashes, without any understandable for
me reason. If someone can, please help.