<table><tr><td style="">anemeth added a comment.
</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/D12804">View Revision</a></tr></table><br /><div><div><p>As others said the dpi scaling should normally be dealt with <tt style="background: #ebebeb; font-size: 13px;">QImage::setDevicePixelRatio()</tt><br />
As far as I can tell this is not working with Breeze for the following reason:</p>

<p>The decoration rendering starts here: <a href="https://github.com/KDE/kwin/blob/master/decorations/decorationrenderer.cpp#L66" class="remarkup-link" target="_blank" rel="noreferrer">https://github.com/KDE/kwin/blob/master/decorations/decorationrenderer.cpp#L66</a><br />
The dpi is set here correctly with <tt style="background: #ebebeb; font-size: 13px;">QImage::setDevicePixelRatio()</tt><br />
However this dpi value here is incorrect.<br />
<tt style="background: #ebebeb; font-size: 13px;">client()->client()->screenScale()</tt> is defined here: <a href="https://github.com/KDE/kwin/blob/master/toplevel.cpp#L316" class="remarkup-link" target="_blank" rel="noreferrer">https://github.com/KDE/kwin/blob/master/toplevel.cpp#L316</a> and gets the value from here: <a href="https://github.com/KDE/kwin/blob/master/toplevel.cpp#L277" class="remarkup-link" target="_blank" rel="noreferrer">https://github.com/KDE/kwin/blob/master/toplevel.cpp#L277</a><br />
And in that function <tt style="background: #ebebeb; font-size: 13px;">qreal newScale = screens()->scale(m_screen);</tt> gets the value from here: <a href="https://github.com/KDE/kwin/blob/master/screens.cpp#L114" class="remarkup-link" target="_blank" rel="noreferrer">https://github.com/KDE/kwin/blob/master/screens.cpp#L114</a><br />
You can see that this function just returns 1, and because of this the devicepixelratio of the decoration QImage will always be 1.</p>

<p>If I set Plasma scaling to 2 and change this value to 2 or the devicepixelratio here <a href="https://github.com/KDE/kwin/blob/master/decorations/decorationrenderer.cpp#L69" class="remarkup-link" target="_blank" rel="noreferrer">https://github.com/KDE/kwin/blob/master/decorations/decorationrenderer.cpp#L69</a> to 2 then the decoration renders very incorrectly.</p>

<p>We already have a workaround in Breeze for this in some parts. For example here <a href="https://github.com/KDE/breeze/blob/master/kdecoration/breezebutton.cpp#L166" class="remarkup-link" target="_blank" rel="noreferrer">https://github.com/KDE/breeze/blob/master/kdecoration/breezebutton.cpp#L166</a> when rendering the buttons for Breeze decoration we scale the QPainter manually.<br />
This patch adds another workaround, but gets the job done, and as fixing this whole thing would be a big effort.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R31 Breeze</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D12804">https://phabricator.kde.org/D12804</a></div></div><br /><div><strong>To: </strong>anemeth, Breeze, VDG, hpereiradacosta, davidedmundson<br /><strong>Cc: </strong>zzag, davidedmundson, ngraham, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>