Commit 7255535a authored by Sergey Chupligin's avatar Sergey Chupligin

[AppSwitcher] fix app window rotation on appswitcher

parent 5f92e64f
...@@ -50,7 +50,7 @@ Item { ...@@ -50,7 +50,7 @@ Item {
Flickable { Flickable {
id: flickable id: flickable
contentHeight: gridview.height contentHeight: gridview.height
width: parent.width - 10 // see comment re right anchor below width: closeMode ? parent.width - 20 : parent.width // see comment re right anchor below
MouseArea { MouseArea {
height: flickable.contentHeight > flickable.height ? flickable.contentHeight : flickable.height height: flickable.contentHeight > flickable.height ? flickable.contentHeight : flickable.height
...@@ -64,16 +64,17 @@ Item { ...@@ -64,16 +64,17 @@ Item {
anchors { anchors {
top: parent.top top: parent.top
topMargin: closeMode ? 20 : 0
bottom: toolBar.top bottom: toolBar.top
left: parent.left left: parent.left
// no right anchor to avoid double margin (complicated math) // no right anchor to avoid double margin (complicated math)
margins: 10 leftMargin: closeMode ? 20 : 0
} }
Grid { Grid {
id: gridview id: gridview
columns: 2 columns: 2
spacing: 10 spacing: closeMode ? 20 : 0
move: Transition { move: Transition {
NumberAnimation { NumberAnimation {
properties: "x,y" properties: "x,y"
......
...@@ -27,7 +27,9 @@ Image { ...@@ -27,7 +27,9 @@ Image {
id: closeButton id: closeButton
signal clicked() signal clicked()
source: '/usr/share/lipstick-glacier-home-qt5/qml/theme/icon-m-framework-close-thumbnail.png' source: '/usr/share/lipstick-glacier-home-qt5/qml/images/closeapp.svg'
sourceSize.width: width
sourceSize.height: height
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
......
...@@ -34,11 +34,11 @@ MouseArea { ...@@ -34,11 +34,11 @@ MouseArea {
WindowPixmapItem { WindowPixmapItem {
id: windowPixmap id: windowPixmap
width: rotateWindowContent ? parent.height : parent.width width: rotateWindowContent ? parent.width : parent.height
height: rotateWindowContent ? parent.width : parent.height height: rotateWindowContent ? parent.height : parent.width
windowId: model.window windowId: model.window
transform: Rotation { transform: Rotation {
angle: rotateWindowContent ? 90 : 0 angle: rotateWindowContent ? 0 : 90
origin.x: windowPixmap.height / 2 origin.x: windowPixmap.height / 2
origin.y: windowPixmap.height / 2 origin.y: windowPixmap.height / 2
} }
...@@ -95,12 +95,15 @@ MouseArea { ...@@ -95,12 +95,15 @@ MouseArea {
CloseButton { CloseButton {
id: closeButton id: closeButton
width: parent.width/4
height: width
Behavior on scale { PropertyAnimation { duration: 300; easing.type: Easing.OutBack } } Behavior on scale { PropertyAnimation { duration: 300; easing.type: Easing.OutBack } }
scale: switcherRoot.closeMode ? 1 : 0 scale: switcherRoot.closeMode ? 1 : 0
opacity: scale opacity: scale
enabled: !closeAnimation.running enabled: !closeAnimation.running
anchors { anchors {
bottom: parent.bottom bottom: parent.bottom
bottomMargin: height*0.5
horizontalCenter: parent.horizontalCenter horizontalCenter: parent.horizontalCenter
} }
onClicked: closeAnimation.start() onClicked: closeAnimation.start()
......
...@@ -13,7 +13,8 @@ styles.files = nemovars.conf ...@@ -13,7 +13,8 @@ styles.files = nemovars.conf
images.path = /usr/share/lipstick-glacier-home-qt5/qml/images images.path = /usr/share/lipstick-glacier-home-qt5/qml/images
images.files = qml/images/*.png \ images.files = qml/images/*.png \
qml/images/*.jpg qml/images/*.jpg \
qml/images/*.svg
theme.path = /usr/share/lipstick-glacier-home-qt5/qml/theme theme.path = /usr/share/lipstick-glacier-home-qt5/qml/theme
theme.files = qml/theme/*.png theme.files = qml/theme/*.png
......
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