Skip to content
Commit 7bffadad authored by Mikhail Zolotukhin's avatar Mikhail Zolotukhin
Browse files

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:

1. We ask KWin to render current decoration buttons to custom QPainters.
   For each button we must export every state (clicked, hovered, normal, inactive).
2. QPainters then export decoration buttons to svg's.
3. Then we save those images to assets folder in
   `~/.config/gtk-3.0/assets`
4. Then we create custom .css for Breeze GTK, that tells the theme
   to use these saved images for decorations.

All of the above is only done if the current GTK theme is Breeze.
parent c16c9c14
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment