on xenial help sign in
fall back to 8 px/gu if GRID_UNIT_PX doesn't define anything meaningful
0e58649Michael Zanetti
tests/mocks/Unity/Application/ApplicationScreenshotProvider.cpp+3
@@ -54,6 +54,9 @@ QImage ApplicationScreenshotProvider::requestImage(const QString &imageId, QSize
54
54
55 if (app->stage() == ApplicationInfo::SideStage) {
55 if (app->stage() == ApplicationInfo::SideStage) {
56 QByteArray gus = qgetenv("GRID_UNIT_PX");
56 QByteArray gus = qgetenv("GRID_UNIT_PX");
57+ if (gus.isEmpty() || gus.toInt() == 0) {
58+ gus = "8";
59+ }
57 image = image.scaledToWidth(gus.toInt() * 48);
60 image = image.scaledToWidth(gus.toInt() * 48);
58 } else {
61 } else {
59 // Lets scale main stage applications to be the size of the screen/window.
62 // Lets scale main stage applications to be the size of the screen/window.