[Merge] lp:~dandrader/qtubuntu/logicalDpi into lp:qtubuntu

Daniel d'Andrada daniel.dandrada at canonical.com
Fri Mar 24 19:42:33 UTC 2017


On 24/03/2017 12:24, Lukáš Tinkl wrote:
> Review: Needs Information
>
> if (mGridUnitPxEnv != 0) {
>          mLogicalDpi.first = mGridUnitPxEnv * mGridUnitToLogicalDpiMultiplier;
>          mLogicalDpi.second = mGridUnitPxEnv * mGridUnitToLogicalDpiMultiplier;
>      } else {
>          mLogicalDpi.first = mScale * mMirScaleToGridUnitMultiplier * mGridUnitToLogicalDpiMultiplier;
>          mLogicalDpi.second = mScale * mMirScaleToGridUnitMultiplier * mGridUnitToLogicalDpiMultiplier;
>      }
>
> I think this could be simplified; if mScale is by default 1.0 and you'd initialize mGridUnitPxEnv to the default value of mMirScaleToGridUnitMultiplier (8.0), this could become one branch.

Then I wouldn't know whether the environment variable GRID_UNIT_PX is 
defined or not. This is important since the environment var has a higher 
precedence than what the server says (through the scale info). 
Specifying a GRID_UNIT_PX when launching an app is a way of overriding 
the default behavior (which is getting the scale from the server).


-- 
https://code.launchpad.net/~dandrader/qtubuntu/logicalDpi/+merge/320940
Your team Ubuntu Phablet Team is subscribed to branch lp:qtubuntu.



More information about the Ubuntu-reviews mailing list