on xenial help sign in
Rotate application screenshot to compensate for shell rotation. Fixes window management animations
commit586efb4e582bff4dd3cec2ad1b77b9d17c2d7275 authorGerry Boland <gerry.boland@canonical.com> dateWed 12 Feb 2014, 18:24 (13 years ago) parent741d478
1 file changed+11−7
qml/Components/ApplicationScreenshot.qml+11−7
qml/Components/ApplicationScreenshot.qml+11−7
@@ -15,6 +15,7 @@
1515 */
1616
1717import QtQuick 2.0
18+import QtQuick.Window 2.0
1819import Ubuntu.Components 0.1
1920import Unity.Application 0.1
2021
@@ -50,12 +51,15 @@ Item {
5051 visible: applicationScreenshot.withBackground
5152 }
5253
53− ApplicationImage {
54− id: applicationImage
55− objectName: "screenshot image"
56− width: applicationScreenshot.application ? parent.width : 0
57− height: applicationScreenshot.application ? parent.height : 0
58− visible: applicationScreenshot.application != null && ready
59− source: ApplicationManager.findApplication((application) ? application.appId : "")
54+ OrientationHelper {
55+ orientationAngle: Screen.angleBetween(Screen.primaryOrientation, nativeOrientation) // compensate for Shell rotation
56+ transitionEnabled: false
57+ ApplicationImage {
58+ id: applicationImage
59+ objectName: "screenshot image"
60+ anchors.fill: parent
61+ visible: applicationScreenshot.application != null && ready
62+ source: ApplicationManager.findApplication((application) ? application.appId : "")
63+ }
6064 }
6165}