[vlc-commits] qml: fix ExpandGridView repositionning when expanding
Pierre Lamot
git at videolan.org
Mon Oct 14 11:59:51 CEST 2019
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu Oct 10 14:06:12 2019 +0200| [fc641f2577de4f18a7b1991e57dd7f3919f5339b] | committer: Jean-Baptiste Kempf
qml: fix ExpandGridView repositionning when expanding
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fc641f2577de4f18a7b1991e57dd7f3919f5339b
---
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() {
More information about the vlc-commits
mailing list