From 350ea01963c23c749e1fd97df4a5880e046fa7d8 Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Fri, 5 Jan 2024 16:51:34 +0100 Subject: [PATCH] Change some hover animation and spacings --- ScreenPlay/qml/Community/XMLNewsfeed.qml | 6 +- ScreenPlay/qml/Create/StartInfoLinkImage.qml | 25 ++++++-- .../qml/Create/Wizards/GodotWallpaper.qml | 2 +- .../qml/Create/Wizards/HTMLWallpaper.qml | 2 +- .../qml/Create/Wizards/QMLWallpaper.qml | 2 +- ScreenPlay/qml/Installed/ScreenPlayItem.qml | 64 +++++++++++-------- 6 files changed, 65 insertions(+), 36 deletions(-) diff --git a/ScreenPlay/qml/Community/XMLNewsfeed.qml b/ScreenPlay/qml/Community/XMLNewsfeed.qml index f0e13477..f457af7f 100644 --- a/ScreenPlay/qml/Community/XMLNewsfeed.qml +++ b/ScreenPlay/qml/Community/XMLNewsfeed.qml @@ -181,9 +181,10 @@ Item { ScaleAnimator { target: img - duration: 80 + duration: 2000 from: 1 to: 1.05 + easing.type: Easing.OutQuart } }, Transition { @@ -192,9 +193,10 @@ Item { ScaleAnimator { target: img - duration: 80 + duration: 2000 from: 1.05 to: 1 + easing.type: Easing.OutQuart } } ] diff --git a/ScreenPlay/qml/Create/StartInfoLinkImage.qml b/ScreenPlay/qml/Create/StartInfoLinkImage.qml index 0bd5bea0..8b1a0ac7 100644 --- a/ScreenPlay/qml/Create/StartInfoLinkImage.qml +++ b/ScreenPlay/qml/Create/StartInfoLinkImage.qml @@ -124,20 +124,37 @@ Item { ScaleAnimator { target: image - duration: 80 + duration: 2000 from: 1 - to: 1.05 + to: 1.1 + easing.type: Easing.OutQuart + } + PropertyAnimation { + target: txtText + property: "color" + from: "white" + to: Material.color(Material.Orange) + duration: 200 } }, Transition { from: "hover" to: "" + PropertyAnimation { + target: txtText + property: "color" + duration: 200 + from: Material.color(Material.Orange) + to: "white" + } + ScaleAnimator { target: image - duration: 80 - from: 1.05 + duration: 2000 + from: 1.1 to: 1 + easing.type: Easing.OutQuart } } ] diff --git a/ScreenPlay/qml/Create/Wizards/GodotWallpaper.qml b/ScreenPlay/qml/Create/Wizards/GodotWallpaper.qml index 18a4a573..578b39f2 100644 --- a/ScreenPlay/qml/Create/Wizards/GodotWallpaper.qml +++ b/ScreenPlay/qml/Create/Wizards/GodotWallpaper.qml @@ -69,7 +69,7 @@ WizardPage { } Item { - height: 30 + height: 10 } Util.HeadlineSection { diff --git a/ScreenPlay/qml/Create/Wizards/HTMLWallpaper.qml b/ScreenPlay/qml/Create/Wizards/HTMLWallpaper.qml index 1e13fb53..f4f93281 100644 --- a/ScreenPlay/qml/Create/Wizards/HTMLWallpaper.qml +++ b/ScreenPlay/qml/Create/Wizards/HTMLWallpaper.qml @@ -69,7 +69,7 @@ WizardPage { } Item { - height: 30 + height: 10 } Util.HeadlineSection { diff --git a/ScreenPlay/qml/Create/Wizards/QMLWallpaper.qml b/ScreenPlay/qml/Create/Wizards/QMLWallpaper.qml index 75b258fa..e7bc9b5c 100644 --- a/ScreenPlay/qml/Create/Wizards/QMLWallpaper.qml +++ b/ScreenPlay/qml/Create/Wizards/QMLWallpaper.qml @@ -69,7 +69,7 @@ WizardPage { } Item { - height: 30 + height: 10 } Util.HeadlineSection { diff --git a/ScreenPlay/qml/Installed/ScreenPlayItem.qml b/ScreenPlay/qml/Installed/ScreenPlayItem.qml index 85b9fea9..733390b1 100644 --- a/ScreenPlay/qml/Installed/ScreenPlayItem.qml +++ b/ScreenPlay/qml/Installed/ScreenPlayItem.qml @@ -26,16 +26,16 @@ Item { height: 180 onTypeChanged: { if (App.util.isWidget(type)) { - icnType.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_widgets.svg"; - return; + icnType.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_widgets.svg" + return } if (App.util.isScene(type)) { - icnType.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_code.svg"; - return; + icnType.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_code.svg" + return } if (App.util.isVideo(type)) { - icnType.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_movie.svg"; - return; + icnType.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_movie.svg" + return } } @@ -43,10 +43,10 @@ Item { running: true onTriggered: showAnim.start() interval: { - var itemIndexMax = itemIndex; + var itemIndexMax = itemIndex if (itemIndex > 30) - itemIndexMax = 3; - 5 * itemIndexMax * Math.random(); + itemIndexMax = 3 + 5 * itemIndexMax * Math.random() } } @@ -232,20 +232,20 @@ Item { cursorShape: Qt.PointingHandCursor acceptedButtons: Qt.LeftButton | Qt.RightButton onEntered: { - root.state = "hover"; - screenPlayItemImage.state = "hover"; - screenPlayItemImage.enter(); + root.state = "hover" + screenPlayItemImage.state = "hover" + screenPlayItemImage.enter() } onExited: { - root.state = ""; - screenPlayItemImage.state = "loaded"; - screenPlayItemImage.exit(); + root.state = "" + screenPlayItemImage.state = "loaded" + screenPlayItemImage.exit() } onClicked: function (mouse) { if (mouse.button === Qt.LeftButton) - App.util.setSidebarItem(root.screenId, root.type); + App.util.setSidebarItem(root.screenId, root.type) else if (mouse.button === Qt.RightButton) - root.openContextMenu(Qt.point(mouseX, mouseY)); + root.openContextMenu(Qt.point(mouseX, mouseY)) } } } @@ -258,37 +258,42 @@ Item { ScaleAnimator { target: screenPlayItemWrapper - duration: 80 + duration: 2000 from: 1 to: 1.05 + easing.type: Easing.OutQuart } ScaleAnimator { target: effect - duration: 80 + duration: 2000 from: 1 to: 1.05 + easing.type: Easing.OutQuart } OpacityAnimator { target: icnType - duration: 80 + duration: 2000 from: 0.25 to: 0.8 + easing.type: Easing.OutQuart } OpacityAnimator { target: icnAudio - duration: 80 + duration: 2000 from: 0.25 to: 0.8 + easing.type: Easing.OutQuart } OpacityAnimator { target: effect - duration: 80 + duration: 2000 from: 0.6 to: 1 + easing.type: Easing.OutQuart } }, Transition { @@ -297,37 +302,42 @@ Item { ScaleAnimator { target: screenPlayItemWrapper - duration: 80 + duration: 2000 from: 1.05 to: 1 + easing.type: Easing.OutQuart } ScaleAnimator { target: effect - duration: 80 + duration: 2000 from: 1.05 to: 1 + easing.type: Easing.OutQuart } OpacityAnimator { target: icnType - duration: 80 + duration: 2000 from: 0.8 to: 0.25 + easing.type: Easing.OutQuart } OpacityAnimator { target: icnAudio - duration: 80 + duration: 2000 from: 0.8 to: 0.25 + easing.type: Easing.OutQuart } OpacityAnimator { target: effect - duration: 80 + duration: 2000 from: 1 to: 0.5 + easing.type: Easing.OutQuart } } ]