← Back to team overview

touch-packages team mailing list archive

[Bug 1275748] Re: Ubuntu QPA plugin does not override QScreen::devicePixelRatio

 

** Also affects: qtubuntu
   Importance: Undecided
       Status: New

** Changed in: qtubuntu
       Status: New => In Progress

** Changed in: qtubuntu
   Importance: Undecided => Medium

** Changed in: qtubuntu
     Assignee: (unassigned) => Gerry Boland (gerboland)

-- 
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 QT Ubuntu:
  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