D20445: signalplotter: Add highdpi support

Vlad Zagorodniy noreply at phabricator.kde.org
Wed Apr 10 18:03:27 BST 2019


zzag added a comment.


  Oh, nice! FWIW, I made a patch to add HighDPI support some time ago as well. I haven't uploaded it for review because there were issues with beams not being smooth.

INLINE COMMENTS

> ksignalplotter.cpp:681-682
> +        const auto dpr = mScrollableImage.devicePixelRatio();
> +        QPointF point = boundingBox.topRight() - QPointF(mScrollOffset - 2, 0);
> +        QRectF sourceRect(0, 0, (mScrollOffset - 1) * dpr, boundingBox.height() * dpr);
>  #ifdef USE_QIMAGE

Can be const.

> ksignalplotter.cpp:691
>      if(widthOfSecondHalf > 0) {
> +        const auto dpr = mScrollableImage.devicePixelRatio();
> +        QRectF sourceRect(mScrollableImage.width() - (widthOfSecondHalf + 1) * dpr, 0, widthOfSecondHalf * dpr, boundingBox.height() * dpr);

Don't abuse `auto`.

REPOSITORY
  R111 KSysguard Library

REVISION DETAIL
  https://phabricator.kde.org/D20445

To: volkov
Cc: zzag, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190410/2dae8bb0/attachment.html>


More information about the Plasma-devel mailing list