touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #92458
[Bug 1275748] Re: Ubuntu QPA plugin does not override QScreen::devicePixelRatio
** Branch linked: lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/dpr
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to qtubuntu in Ubuntu.
https://bugs.launchpad.net/bugs/1275748
Title:
Ubuntu QPA plugin does not override QScreen::devicePixelRatio
Status in qtubuntu:
In Progress
Status in qtubuntu package in Ubuntu:
Confirmed
Status in ubuntu-ui-toolkit package in Ubuntu:
Confirmed
Bug description:
In bug 1257721, I made Oxide DPI aware by passing an appropriate
device pixel ratio to Chromium. However, the way this is implemented
on Ubuntu is not really ideal. I expected to be able to read the DPR
from QScreen::devicePixelRatio, but this is always 1.0f on Ubuntu
regardless of the device scale. Instead, device pixel independence is
implemented entirely in ubuntu-ui-toolkit by providing a QML component
for converting between grid units and device pixels, based on an
environment variable called "GRID_UNIT_PX".
For now, I implemented a workaround in Oxide to also set the DPR to
GRID_UNIT_PX / 8 when running with the Ubuntu platform plugin, and
QScreen::devicePixelRatio on all other platforms.
I think that qtubuntu should instead override
QScreen::devicePixelRatio (that could still come from the same
environment variable for now), and ubuntu-ui-toolkit should do the
conversion from grid units to device pixels using this instead.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qtubuntu/+bug/1275748/+subscriptions