on xenial help sign in
Keep aspect ratio of app screenshots and crop them square.
commit03c30f9a836e88b8530672aa62ad99de1f2c1199 authorMichael Zanetti <michael.zanetti@canonical.com> dateFri 21 Feb 2014, 22:00 (13 years ago) parent69a0d216905e3e
1 file changed+3−5
qml/Dash/Apps/RunningApplicationTile.qml+3−5
qml/Dash/Apps/RunningApplicationTile.qml+3−5
@@ -63,11 +63,9 @@ AbstractButton {
6363 horizontalCenter: parent.horizontalCenter
6464 }
6565
66− // FIXME: width and height should be defined according to the
67− // application window's aspect ratio.
68− width: (application.stage === ApplicationInfo.MainStage && __sideStageEnabled) ?
69− units.gu(22) : units.gu(11)
7066 height: (__sideStageEnabled) ? units.gu(22) : units.gu(19)
67+ width: applicationImage.width
68+
7169 radius: "medium"
7270 image: applicationImage
7371 }
@@ -75,8 +73,8 @@ AbstractButton {
7573 ApplicationImage {
7674 id: applicationImage
7775 source: ApplicationManager.findApplication((application) ? application.appId : "")
78− width: shapedApplicationImage.width
7976 height: shapedApplicationImage.height
77+ width: Math.min(height, height * sourceSize.width / sourceSize.height)
8078 }
8179
8280 UbuntuShape {