[vlc-devel] [PATCH 49/49] qml: fix ExpandGridView repositionning when expanding

Pierre Lamot pierre at videolabs.io
Fri Oct 11 15:18:13 CEST 2019


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

diff --git a/modules/gui/qt/qml/utils/ExpandGridView.qml b/modules/gui/qt/qml/utils/ExpandGridView.qml
index 268133ad33..7b1ebab661 100644
--- a/modules/gui/qt/qml/utils/ExpandGridView.qml
+++ b/modules/gui/qt/qml/utils/ExpandGridView.qml
@@ -330,20 +330,8 @@ NavigableFocusScope {
             animateExpandItem.start()
 
             // Sliding animation
-
-            var newContentY = flickable.contentY;
-            var currentItemYPos = root.getItemPos(currentIndex)[1]
-            if (currentItemYPos + cellHeight + expandItemHeight > flickable.contentY + flickable.height) {
-                if (cellHeight + expandItemHeight > flickable.height)
-                    newContentY = currentItemYPos
-                else
-                    newContentY = Math.min(
-                                currentItemYPos + cellHeight + expandItemHeight - flickable.height,
-                                flickable.contentHeight + expandItemHeight - flickable.height)
-            }
-
-            if (newContentY !== flickable.contentY)
-                animateFlickableContentY(newContentY)
+            var currentItemYPos = root.getItemPos(_expandIndex)[1]
+            animateFlickableContentY(currentItemYPos)
         }
 
         function retract() {
-- 
2.20.1



More information about the vlc-devel mailing list