From 76083ba0bed1ba328a53e69b6a56febe6008f8c2 Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Tue, 18 Aug 2020 18:03:42 +0200 Subject: [PATCH] Remove unnecessary states --- ScreenPlay/qml/Installed/ScreenPlayItem.qml | 47 ++------------------- 1 file changed, 3 insertions(+), 44 deletions(-) diff --git a/ScreenPlay/qml/Installed/ScreenPlayItem.qml b/ScreenPlay/qml/Installed/ScreenPlayItem.qml index ff9fb4a6..b78ed424 100644 --- a/ScreenPlay/qml/Installed/ScreenPlayItem.qml +++ b/ScreenPlay/qml/Installed/ScreenPlayItem.qml @@ -9,7 +9,6 @@ Item { id: screenPlayItem width: 320 height: 180 - state: "invisible" opacity: 0 property string customTitle: "name here" @@ -36,11 +35,6 @@ Item { return } } - - Component.onCompleted: { - screenPlayItem.state = "visible" - } - Timer { id: timerAnim interval: { @@ -77,6 +71,7 @@ Item { origin.y: height * .5 } ] + ParallelAnimation { id: showAnim running: false @@ -211,7 +206,7 @@ Item { } onExited: { if (!hasMenuOpen) { - screenPlayItem.state = "visible" + screenPlayItem.state = "" screenPlayItemImage.state = "loaded" screenPlayItemImage.exit() } @@ -271,43 +266,7 @@ Item { } states: [ - State { - name: "invisible" - PropertyChanges { - target: screenPlayItemWrapper - y: -10 - opacity: 0 - } - PropertyChanges { - target: effect - opacity: 0 - } - }, - State { - name: "visible" - PropertyChanges { - target: effect - opacity: 0.4 - } - PropertyChanges { - target: screenPlayItemWrapper - y: 0 - opacity: 1 - } - PropertyChanges { - target: screenPlayItem - width: 320 - height: 180 - } - PropertyChanges { - target: icnType - opacity: 0 - } - }, - State { - name: "description" - }, State { name: "hover" PropertyChanges { @@ -333,7 +292,7 @@ Item { ] transitions: [ Transition { - from: "visible" + from: "" to: "hover" reversible: true