gikari created this revision. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. gikari requested review of this revision.
REVISION SUMMARY 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. REPOSITORY R99 KDE Gtk Configuration Tool BRANCH decorations-appearance (branched from master) REVISION DETAIL https://phabricator.kde.org/D28623 AFFECTED FILES CMakeLists.txt kded/CMakeLists.txt kded/configvalueprovider.cpp kded/configvalueprovider.h kded/gtkconfig.cpp kded/gtkconfig.h kded/kwin_bridge/CMakeLists.txt kded/kwin_bridge/dummydecoratedclient.cpp kded/kwin_bridge/dummydecoratedclient.h kded/kwin_bridge/dummydecorationbridge.cpp kded/kwin_bridge/dummydecorationbridge.h To: gikari Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart