Merge lp://qastaging/~dandrader/qtubuntu/logicalDpi into lp://qastaging/qtubuntu
Proposed by
Daniel d'Andrada
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Gerry Boland | ||||
Approved revision: | 386 | ||||
Merged at revision: | 390 | ||||
Proposed branch: | lp://qastaging/~dandrader/qtubuntu/logicalDpi | ||||
Merge into: | lp://qastaging/qtubuntu | ||||
Diff against target: |
137 lines (+40/-13) 2 files modified
src/ubuntumirclient/qmirclientscreen.cpp (+34/-11) src/ubuntumirclient/qmirclientscreen.h (+6/-2) |
||||
To merge this branch: | bzr merge lp://qastaging/~dandrader/qtubuntu/logicalDpi | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Lukáš Tinkl (community) | Approve | ||
Gerry Boland (community) | Approve | ||
Unity8 CI Bot | continuous-integration | Approve | |
Review via email: mp+320940@code.qastaging.launchpad.net |
Commit message
Proper implementation of QPlatformScreen
It's *not* the physical DPI.
It's just a value used for scaling point sized UI elements (mainly QWidget text)
You can view it as the value used to convert pt (point) to pixels
Description of the change
To test. Run kate or QtCreator without any arguments. Then run it with different GRID_UNIT_PX values.
A good reference is that when a QWidget-based application have the same grid unit value as unity8 itself, the text size in its buttons etc should be roughly the same as the size of the text in its window decorations.
To post a comment you must log in.
if (mGridUnitPxEnv != 0) {
mLogicalDpi. first = mGridUnitPxEnv * mGridUnitToLogi calDpiMultiplie r;
mLogicalDpi. second = mGridUnitPxEnv * mGridUnitToLogi calDpiMultiplie r;
mLogicalDpi. first = mScale * mMirScaleToGrid UnitMultiplier * mGridUnitToLogi calDpiMultiplie r;
mLogicalDpi. second = mScale * mMirScaleToGrid UnitMultiplier * mGridUnitToLogi calDpiMultiplie r;
} else {
}
I think this could be simplified; if mScale is by default 1.0 and you'd initialize mGridUnitPxEnv to the default value of mMirScaleToGrid UnitMultiplier (8.0), this could become one branch.