D5114: support for high dpi in aurorae

Thomas Lübking noreply at phabricator.kde.org
Sun Jun 4 07:20:24 UTC 2017


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170604/b4b24c13/attachment.html>


More information about the Plasma-devel mailing list