Merge lp://staging/~ubuntu-sdk-team/ubuntu-ui-toolkit/dpr into lp://staging/ubuntu-ui-toolkit
Status: | Superseded | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Proposed branch: | lp://staging/~ubuntu-sdk-team/ubuntu-ui-toolkit/dpr | ||||||||||||
Merge into: | lp://staging/ubuntu-ui-toolkit | ||||||||||||
Prerequisite: | lp://staging/ubuntu-ui-toolkit/staging | ||||||||||||
Diff against target: |
245 lines (+61/-29) 5 files modified
modules/Ubuntu/Components/plugin/ucqquickimageextension.cpp (+10/-3) modules/Ubuntu/Components/plugin/ucubuntushape.cpp (+8/-10) modules/Ubuntu/Components/plugin/ucunits.cpp (+37/-12) modules/Ubuntu/Components/plugin/ucunits.h (+5/-3) ubuntu-sdk.pro (+1/-1) |
||||||||||||
To merge this branch: | bzr merge lp://staging/~ubuntu-sdk-team/ubuntu-ui-toolkit/dpr | ||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu SDK team | Pending | ||
Review via email: mp+256469@code.staging.launchpad.net |
This proposal has been superseded by a proposal from 2015-04-16.
Description of the change
[RFC] Compensate for Qt's device pixel ratio multiplier
The UITK has flexible UI scaling support through the use of Grid Units, where one can set a grid unit to be an integer number of pixels, and the whole UI adopts to suit this. GRID_UNIT_PX=10 is the way to set this.
Qt however has its own scaling solution: QScreen:
This latter solution works for all Qt apps, whereas Grid units only apply to UITK-based apps. For a HighDPI desktop, we want to use both solutions.
However these two scaling solutions are cumulative. Should one set
QT_DEVICE_
then a box of height units.gu(1) will be drawn 20 physical pixels high.
The intention of this MR is to guarantee that GRID_UNIT_PX corresponds to physical pixels, no matter what QScreen:
To test, open the gallery with these 2 different envs:
QT_DEVICE_
QT_DEVICE_
Some visual inconsistencies are exact font rendering sizes and some rounding issues causing off-by-one positioning errors.