[Development] The QT_SCREEN_SCALE_FACTORS rounding problem is still annoyingly valid

Morten Sørvig Morten.Sorvig at qt.io
Wed Feb 15 15:19:29 CET 2023



On 27 Jan 2023, at 18:04, Ilya Fedin <fedin-ilja2010 at ya.ru> wrote:



My patch doesn't modify setScreenFactor, so the rounding is applied
only to the variable value (and to the property on QScreen object, as
it's the only remaining source without rounding in
QHighDpiScaling::screenSubfactor), so the programmatic calls of
QHighDpiScaling::setScreenFactor are unaffected.

However, it still rounds the value when reading it, and so tst_QQmlPreview::zoom() gets
a rounded value and fails. At least that’s what I’m seeing.

Here’s a new attempt: round the value when applying from the env. variable,
outside of setScreenFactor() which now keeps its existing behavior:

https://codereview.qt-project.org/c/qt/qtbase/+/460566

Morten


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20230215/4a081f73/attachment.htm>


More information about the Development mailing list