Kirigami2
8 import org.kde.kirigami 2.4 as Kirigami
21 property var leftMargins: []
22 readonly
property int delegateWidth: Math.min(cellWidth, maximumColumnWidth) - Kirigami.Units.largeSpacing * 2
25 delegate: Kirigami.DelegateRecycler {
26 width: calculations.delegateWidth
28 anchors.left: GridView.view.contentItem.left
30 sourceComponent: root._delegateComponent
32 const columnIndex = index % root.columns
33 if (index < root.columns) {
35 calculations.leftMargins[columnIndex] = (width + Kirigami.Units.largeSpacing * 2)
36 * (columnIndex) + root.width / 2
37 - (root.columns * (width + Kirigami.Units.largeSpacing * 2)) / 2;
39 anchors.leftMargin = calculations.leftMargins[columnIndex];
43 if (calculations.leftMargins.length !== root.columns) {
44 calculations.leftMargins =
new Array(root.columns);
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Jan 29 2023 04:11:03 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.