Fix device scaling mess

Bug #1548996 reported by Chris Coulson on 2016-02-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Oxide
Medium
Chris Coulson

Bug Description

Oxide assumes that the coordinate space for QtQuick is always physical pixels, and that device scaling is always performed by the application / toolkit. This is only true for Ubuntu UI apps running on the Ubuntu QPA plugin though.

Other QPA plugins take care of scaling already if it's not handled by the windowing system (eg, xcb). In Qt 5.6, the API boundary between QPA plugins and Qt works in native pixels (which are in the coordinate space that the windowing system works with - in X11 this is physical pixels, in OS X this is scaled already), and Qt takes care of mapping between native pixels and device independent pixels rather than this being done in the QPA plugins.

Today Oxide is completely broken on xcb with a device scale other than 1. If you launch the browser with QT_DEVICE_PIXEL_RATIO=2 (and without GRID_UNIT_PX set), then the application UI appears to scale correctly because of the scaling in the xcb QPA plugin. However, the webview content is scaled twice (eg, on my 1600 pixel wide display, the webview gets a width of 400 device independent pixels) because we wrongly assume that QtQuick is operating in physical pixels.

We can fix this in Oxide by assuming that QtQuick operates in device independent pixels (as it does on most platforms), but we need to add in an Ubuntu-specific quirk because it does all of its scaling in the UI toolkit.

Changed in oxide:
importance: Undecided → Medium
status: New → Triaged
assignee: nobody → Chris Coulson (chrisccoulson)
milestone: none → branch-1.14
Changed in oxide:
status: Triaged → In Progress
Changed in oxide:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers