From d9a2b1aa60cb869e77c9a42fd6538d8bb4078704 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Thu, 2 Mar 2017 12:40:36 +0100 Subject: [PATCH 1/2] fix broken basic button --- components/TitleBar.qml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/components/TitleBar.qml b/components/TitleBar.qml index aa793985..bcbc0e64 100644 --- a/components/TitleBar.qml +++ b/components/TitleBar.qml @@ -41,6 +41,7 @@ Rectangle { y: -height property string title property alias maximizeButtonVisible: maximizeButton.visible + z: 1 Text { anchors.centerIn: parent @@ -52,28 +53,26 @@ Rectangle { visible: customDecorations } - Behavior on y { - NumberAnimation { duration: 100; easing.type: Easing.InQuad } - } - Rectangle { id: goToBasicVersionButton property bool containsMouse: titleBar.mouseX >= x && titleBar.mouseX <= x + width property bool checked: false anchors.top: parent.top anchors.left: parent.left - color: containsMouse || checked ? "#FFE00A" : "#000000" + color: basicMouseArea.containsMouse || checked ? "#FFE00A" : "#000000" height: 30 width: height Image { anchors.centerIn: parent rotation: parent.checked ? 180 : 0 - source: parent.containsMouse || parent.checked ? "../images/goToBasicVersionHovered.png" : + source: parent.customDecorations || parent.checked ? "../images/goToBasicVersionHovered.png" : "../images/gotoBasicVersion.png" } MouseArea { + id: basicMouseArea + hoverEnabled: true anchors.fill: parent onClicked: { parent.checked = !parent.checked From 8dc95a17e6a054793e8b91e73606e56e95120611 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Thu, 2 Mar 2017 12:40:58 +0100 Subject: [PATCH 2/2] remove animation when swithing to basic layout --- main.qml | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/main.qml b/main.qml index 83e294ec..404a0b57 100644 --- a/main.qml +++ b/main.qml @@ -1039,19 +1039,15 @@ ApplicationWindow { properties: "visible" value: false } - NumberAnimation { + PropertyAction { target: appWindow properties: "height" - to: 30 - easing.type: Easing.InCubic - duration: 200 + value: 30 } - NumberAnimation { + PropertyAction { target: appWindow properties: "width" - to: 470 - easing.type: Easing.InCubic - duration: 200 + value: 470 } PropertyAction { targets: [leftPanel, rightPanel] @@ -1064,12 +1060,10 @@ ApplicationWindow { value: true } - NumberAnimation { + PropertyAction { target: appWindow properties: "height" - to: middlePanel.height - easing.type: Easing.InCubic - duration: 200 + value: middlePanel.height } onStopped: { @@ -1081,12 +1075,10 @@ ApplicationWindow { SequentialAnimation { id: goToProAnimation - NumberAnimation { + PropertyAction { target: appWindow properties: "height" - to: 30 - easing.type: Easing.InCubic - duration: 200 + value: 30 } PropertyAction { target: middlePanel @@ -1098,19 +1090,15 @@ ApplicationWindow { properties: "visible" value: true } - NumberAnimation { + PropertyAction { target: appWindow properties: "width" - to: rightPanelExpanded ? 1269 : 1269 - 300 - easing.type: Easing.InCubic - duration: 200 + value: rightPanelExpanded ? 1269 : 1269 - 300 } - NumberAnimation { + PropertyAction { target: appWindow properties: "height" - to: maxWindowHeight - easing.type: Easing.InCubic - duration: 200 + value: maxWindowHeight } PropertyAction { target: frameArea