8 import QtQuick.Layouts 1.15
9 import org.kde.kirigami 2.19 as Kirigami
14 property Kirigami.PageRow pageRow: parent.pageRow
16 readonly
property Item currentItem: mainLayout.children[pageRow.currentIndex]
19 contentWidth: mainLayout.width
21 boundsBehavior: Flickable.StopAtBounds
22 interactive: Kirigami.Settings.hasTransientTouchInput
25 Math.min(currentItem.x + currentItem.width/2 - root.width/2,
26 root.contentWidth - root.width))
34 readonly
property bool useLayers: pageRow.layers.depth > 1
35 model: useLayers ? pageRow.layers.depth - 1 : pageRow.depth
37 Layout.preferredWidth: delegateLayout.implicitWidth
38 Layout.fillHeight:
true
40 if (mainRepeater.useLayers) {
41 while (pageRow.layers.depth > modelData + 1) {
45 pageRow.currentIndex = modelData;
48 hoverEnabled: !Kirigami.Settings.tabletMode
50 color: Kirigami.Theme.highlightColor
53 opacity: mainRepeater.count > 1 && parent.containsMouse ? 0.1 : 0
59 readonly
property Item page: mainRepeater.useLayers ? pageRow.layers.get(modelData + 1) : pageRow.get(modelData)
63 visible: modelData > 0
64 Layout.alignment:
Qt.AlignVCenter
65 Layout.preferredHeight: Kirigami.Units.iconSizes.small
66 Layout.preferredWidth: Layout.preferredHeight
68 color: Kirigami.Theme.textColor
69 source: LayoutMirroring.enabled ?
"go-next-symbolic-rtl" :
"go-next-symbolic"
72 Layout.leftMargin: Kirigami.Units.largeSpacing
73 color: Kirigami.Theme.textColor
74 verticalAlignment: Text.AlignVCenter
76 text: delegateLayout.page ? delegateLayout.page.title :
""
77 opacity: modelData === pageRow.currentIndex ? 1 : 0.4
78 rightPadding: Kirigami.Units.largeSpacing
85 Behavior on contentX {
87 duration: Kirigami.Units.longDuration
88 easing.type: Easing.InOutQuad