[vlc-devel] [PATCH 19/21] qml: fix play button hover animation

Fatih Uzunoglu fuzun54 at outlook.com
Sat Nov 7 17:53:38 CET 2020


this fixes the animation issue that occurs when Qt 5.15 is used
---
 modules/gui/qt/player/qml/ControlButtons.qml | 25 +++++++++-----------
 1 file changed, 11 insertions(+), 14 deletions(-)

diff --git a/modules/gui/qt/player/qml/ControlButtons.qml b/modules/gui/qt/player/qml/ControlButtons.qml
index b5a34d3761..244ee030e9 100644
--- a/modules/gui/qt/player/qml/ControlButtons.qml
+++ b/modules/gui/qt/player/qml/ControlButtons.qml
@@ -301,27 +301,24 @@ Item{
                         State {
                             name: "opaque"
                             when: innerColorRect.stateIndicator
+                            PropertyChanges {
+                                target: innerColorRect
+                                opacity: 1.0
+                            }
                         },
                         State {
                             name: "transparent"
                             when: !innerColorRect.stateIndicator
+                            PropertyChanges {
+                                target: innerColorRect
+                                opacity: 0
+                            }
                         }
                     ]
 
-                    transitions: [
-                        Transition {
-                            from: "opaque"
-                            to: "transparent"
-
-                            NumberAnimation { target: innerColorRect; properties: "opacity"; to: 0; duration: 75; easing.type: Easing.OutSine }
-                        },
-                        Transition {
-                            from: "transparent"
-                            to: "opaque"
-
-                            NumberAnimation { target: innerColorRect; properties: "opacity"; to: 1; duration: 75; easing.type: Easing.InSine }
-                        }
-                    ]
+                    transitions: Transition {
+                        NumberAnimation { properties: "opacity"; duration: 75; easing.type: Easing.InOutSine }
+                    }
 
                     antialiasing: true
                 }
-- 
2.25.1



More information about the vlc-devel mailing list