[vlc-commits] qml: fix OverlayMenu open animation

Fatih Uzunoglu git at videolan.org
Wed Feb 17 09:31:45 UTC 2021


vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Fri Feb 12 00:23:31 2021 +0300| [34e6e18559bd190d2a92d28c6e99156a5717f895] | committer: Pierre Lamot

qml: fix OverlayMenu open animation

This patch fixes the OverlayMenu open animation not working when Qt 5.15 is used.

Signed-off-by: Pierre Lamot <pierre at videolabs.io>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=34e6e18559bd190d2a92d28c6e99156a5717f895
---

 modules/gui/qt/widgets/qml/OverlayMenu.qml | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/modules/gui/qt/widgets/qml/OverlayMenu.qml b/modules/gui/qt/widgets/qml/OverlayMenu.qml
index 09d6fec5da..8e4af0ca72 100644
--- a/modules/gui/qt/widgets/qml/OverlayMenu.qml
+++ b/modules/gui/qt/widgets/qml/OverlayMenu.qml
@@ -58,17 +58,16 @@ Item {
 
     property var backgroundItem: undefined
 
-    property bool _active: false
-    visible: _active
+    visible: false
 
     function open() {
         listView.currentModel = root.model
-        _active = true
+        visible = true
         listView.forceActiveFocus()
     }
 
     function close() {
-        _active = false
+        visible = false
         backgroundItem.forceActiveFocus()
     }
 
@@ -307,7 +306,7 @@ Item {
     states: [
         State {
             name: "visible"
-            when: _active
+            when: visible
 
             PropertyChanges {
                 target: parentItem
@@ -316,7 +315,7 @@ Item {
         },
         State {
             name: "hidden"
-            when: !_active
+            when: !visible
 
             PropertyChanges {
                 target: parentItem
@@ -327,7 +326,7 @@ Item {
 
     transitions: [
         Transition {
-            from: "hidden"
+            from: "*"
             to: "visible"
 
             NumberAnimation {



More information about the vlc-commits mailing list