Code review comment for lp:~unity-team/qtmir/dpr

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

In src/modules/Unity/Application/mirsurfaceitem.cpp:

"""
- int qmlWidth = (int)width();
- int qmlHeight = (int)height();
+ const qreal dpr = devicePixelRatio();
+ int qmlWidth = (int)width() * dpr;
+ int qmlHeight = (int)height() * dpr;
"""

Now they're no longer representing the qml width and height, thus the naming is misleading.
Better calling them something like newMirWidth and newMirHeight.

Also it would be more correct to cast to int *after* the dpr multiplication: (int)(width() * dpr)

review: Needs Fixing

« Back to merge proposal