<table><tr><td style="">gikari created this revision.<br />Herald added a project: Plasma.<br />Herald added a subscriber: plasma-devel.<br />gikari requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D28623">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Currently GTK applications with Client Side Decoration always use<br />
decorations from the respected GTK CSS theme. Because of CSS nature<br />
different themes may handle decorations in the headerbars differently,<br />
therefore making modifying them via user css a very hard task. However,<br />
what we can do is to use decoration appearance syncing in our own theme</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">Breeze GTK.</li>
</ul>
<p>Breeze GTK uses images (.svg and .png) for representing decoration<br />
buttons (close, minimize, maximize) appearance. So to achieve the goal<br />
what we can do (hypothetically) is the following:</p>
<ol class="remarkup-list">
<li class="remarkup-list-item">Ask KWin to render current decoration buttons to custom QPainters. For each button we must export every state (clicked, hovered, normal).</li>
<li class="remarkup-list-item">QPainters then export decoration buttons to pixmaps or/and svg.</li>
<li class="remarkup-list-item">Then we will save those images to assets folder in <tt style="background: #ebebeb; font-size: 13px;">~/.config/gtk-3.0/assets</tt> or something like that.</li>
<li class="remarkup-list-item">Then we will create custom .css for Breeze GTK, that tells the theme to use these saved images for decorations.</li>
</ol>
<p>I am currently having trouble with the first part, trying to ask KWin to<br />
do QPainter stuff. Currently it crashes, without any understandable for<br />
me reason. If someone can, please help.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R99 KDE Gtk Configuration Tool</div></div></div><br /><div><strong>BRANCH</strong><div><div>decorations-appearance (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D28623">https://phabricator.kde.org/D28623</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>CMakeLists.txt<br />
kded/CMakeLists.txt<br />
kded/configvalueprovider.cpp<br />
kded/configvalueprovider.h<br />
kded/gtkconfig.cpp<br />
kded/gtkconfig.h<br />
kded/kwin_bridge/CMakeLists.txt<br />
kded/kwin_bridge/dummydecoratedclient.cpp<br />
kded/kwin_bridge/dummydecoratedclient.h<br />
kded/kwin_bridge/dummydecorationbridge.cpp<br />
kded/kwin_bridge/dummydecorationbridge.h</div></div></div><br /><div><strong>To: </strong>gikari<br /><strong>Cc: </strong>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<br /></div>