[vlc-commits] qml: fix grid view expand section beeing visible while no item is expanded

Pierre Lamot git at videolan.org
Mon Jun 17 11:25:39 CEST 2019


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu Jun 13 18:44:14 2019 +0200| [2fb147fc09b22c20959a6ea37911dcd4e86b8d97] | committer: Jean-Baptiste Kempf

qml: fix grid view expand section beeing visible while no item is expanded

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/gui/qt/qml/utils/ExpandGridView.qml | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/qml/utils/ExpandGridView.qml b/modules/gui/qt/qml/utils/ExpandGridView.qml
index ad18c9b582..92e2eef682 100644
--- a/modules/gui/qt/qml/utils/ExpandGridView.qml
+++ b/modules/gui/qt/qml/utils/ExpandGridView.qml
@@ -303,7 +303,7 @@ NavigableFocusScope {
             animateRetractItem.start()
         }
 
-        PropertyAnimation {
+        NumberAnimation {
             id: animateRetractItem;
             target: flickable.expandItem;
             properties: "height"
@@ -319,7 +319,7 @@ NavigableFocusScope {
             }
         }
 
-        PropertyAnimation {
+        NumberAnimation {
             id: animateExpandItem;
             target: flickable.expandItem;
             properties: "height"
@@ -328,6 +328,13 @@ NavigableFocusScope {
             from: 0
         }
 
+        Binding {
+            target: flickable.expandItem
+            property: "visible"
+            value: flickable.expandItem.height > 0
+            delayed: true
+        }
+
         function setCurrentItemFocus() {
             var child
             if (currentIndex in idChildrenMap)



More information about the vlc-commits mailing list