D21836: Mind the devicePixelRatio when drawing on-screen in presentation mode

Oliver Sander noreply at phabricator.kde.org
Thu Jun 20 17:29:31 BST 2019


sander marked an inline comment as done.
sander added inline comments.

INLINE COMMENTS

> tobiasdeiminger wrote in presentationwidget.cpp:900
> Maybe use a scoped
> 
>   const QSizeF pmSize { geom.width() * dpr, geom.height() * dpr };
> 
> instead of repeatedly recalculating width and height?

Okay!

> tobiasdeiminger wrote in presentationwidget.cpp:1329
> Is this change necessary? Conversion to `double` was already there. `screenPos()` would change semantic from "relative to widget" to "relative to screen". Doesn't matter because widget is probably always full screen. But otoh the whole thing is called `PresentationWidget`, so keeping "relative to widget" seems reasonable.

You cannot use `x()` and `y()` because they return integer coordinates, while with fractional screen scaling the coordinates really are fractional, too.  But I agree that keeping with "relative to widget" positions is better, so I changed `screenPos` to `localPos`.

REPOSITORY
  R223 Okular

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

To: sander, #okular, ngraham, tobiasdeiminger
Cc: okular-devel, fbampaloukas, joaonetto, tfella, ngraham, darcyshen, aacid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20190620/999cd58f/attachment.html>


More information about the Okular-devel mailing list