[vlc-commits] qml: set x position of indidual items in ExpandGridView
Pierre Lamot
git at videolan.org
Fri Sep 6 18:01:49 CEST 2019
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Tue Aug 27 14:46:04 2019 +0200| [c12024039a6d3aa29ccc711096915be1bb09265c] | committer: Jean-Baptiste Kempf
qml: set x position of indidual items in ExpandGridView
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c12024039a6d3aa29ccc711096915be1bb09265c
---
modules/gui/qt/qml/utils/ExpandGridView.qml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/gui/qt/qml/utils/ExpandGridView.qml b/modules/gui/qt/qml/utils/ExpandGridView.qml
index a346b32abd..0bc40ca3d4 100644
--- a/modules/gui/qt/qml/utils/ExpandGridView.qml
+++ b/modules/gui/qt/qml/utils/ExpandGridView.qml
@@ -122,8 +122,10 @@ NavigableFocusScope {
}
function getItemPos(id) {
+ var colCount = flickable.getNbItemsPerRow()
+ var remainingSpace = flickable.width - colCount * root.cellWidth
var rowCol = getItemRowCol(id)
- return [rowCol[0] * root.cellWidth, rowCol[1] * root.cellHeight]
+ return [(rowCol[0] * root.cellWidth) + (remainingSpace / 2), rowCol[1] * root.cellHeight]
}
function getExpandItemGridId() {
More information about the vlc-commits
mailing list