luebking added a comment.
Just saw this because of a bug report. Why was this patch approved at all? This line: scaleFactor = (qreal)dpi / (qreal)96; is totally nuts. dpi is already qreal, so 96 is implicitly casted and 96.0f or so would have done. Overmore and far worse, the result is implicitly casted to int scaleFactor, ie. truncated - in doubt to 0. --- --> scaleFactor should be float/qreal, if you want and then the various paddings etc. should be like m_borderLeft = qRound(scaleFactor * border.readEntry("BorderLeft", defaultBorderLeft())); In addition there should be a sanity check on the dpi return and bonus points if the dpi is calculated as mean of dpiX and dpiY. And best invoke Kai Uwe Broulik. REPOSITORY R108 KWin REVISION DETAIL https://phabricator.kde.org/D5114 To: mart, #plasma, graesslin Cc: luebking, plasma-devel, kwin, #kwin, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart, lukas