fall back to 8 px/gu if GRID_UNIT_PX doesn't define anything meaningful
commit0e5864992a65aa404cb4140d7ebd18086b8e7ee0
authorMichael Zanetti <michael.zanetti@canonical.com>
dateWed 2 Apr 2014, 17:33 (13 years ago)
parent0a3bfa8
tests/mocks/Unity/Application/ApplicationScreenshotProvider.cpp+3
@@ -54,6 +54,9 @@ QImage ApplicationScreenshotProvider::requestImage(const QString &imageId, QSize
5454
5555 if (app->stage() == ApplicationInfo::SideStage) {
5656 QByteArray gus = qgetenv("GRID_UNIT_PX");
57+ if (gus.isEmpty() || gus.toInt() == 0) {
58+ gus = "8";
59+ }
5760 image = image.scaledToWidth(gus.toInt() * 48);
5861 } else {
5962 // Lets scale main stage applications to be the size of the screen/window.