Commit fd55bad4 authored by eekkelund's avatar eekkelund

[AppSwitcher] Fix minimized application, WindowPixapItem, rotation

parent 9a432526
...@@ -31,6 +31,18 @@ MouseArea { ...@@ -31,6 +31,18 @@ MouseArea {
id: switcherItemRoot id: switcherItemRoot
property bool rotateWindowContent: desktop.isPortrait property bool rotateWindowContent: desktop.isPortrait
property int desktopAngle: {
switch(desktop.orientation) {
case Qt.PortraitOrientation:
return 0
case Qt.InvertedPortraitOrientation:
return 180
case Qt.LandscapeOrientation:
return 270
case Qt.InvertedLandscapeOrientation:
return 90
}
}
WindowPixmapItem { WindowPixmapItem {
id: windowPixmap id: windowPixmap
...@@ -38,9 +50,9 @@ MouseArea { ...@@ -38,9 +50,9 @@ MouseArea {
height: rotateWindowContent ? parent.height : parent.width height: rotateWindowContent ? parent.height : parent.width
windowId: model.window windowId: model.window
transform: Rotation { transform: Rotation {
angle: rotateWindowContent ? 0 : 90 angle:desktopAngle
origin.x: windowPixmap.height / 2 origin.x: rotateWindowContent ? windowPixmap.width / 2 : angle === 270 ? windowPixmap.width / 2 : windowPixmap.height / 2
origin.y: windowPixmap.height / 2 origin.y: rotateWindowContent ? windowPixmap.height / 2 : angle === 270 ? windowPixmap.width / 2 : windowPixmap.height / 2
} }
smooth: true smooth: true
radius: 5 radius: 5
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment