summaryrefslogtreecommitdiffstats
path: root/src/qml/HomeScreen.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/HomeScreen.qml')
-rw-r--r--src/qml/HomeScreen.qml52
1 files changed, 17 insertions, 35 deletions
diff --git a/src/qml/HomeScreen.qml b/src/qml/HomeScreen.qml
index 39e216e..4e62040 100644
--- a/src/qml/HomeScreen.qml
+++ b/src/qml/HomeScreen.qml
@@ -423,42 +423,24 @@ Rectangle {
bottom: parent.bottom
horizontalCenter: parent.horizontalCenter
}
- Rectangle {
- property bool active: gridView.contentX < gridView.page
- width: 10
- height: width
- radius: width / 2
- color: !active ? inactivePagerColor : uiColor
- anchors.verticalCenter: parent.verticalCenter
- MouseArea {
- anchors.fill: parent
- onClicked: gridView.contentX = 0
- }
- }
- Rectangle {
- property bool active: gridView.page <= gridView.contentX && gridView.contentX < 2 * gridView.page
- width: 10
- visible: gridView.count > 8
- height: width
- radius: width / 2
- color: !active ? inactivePagerColor : uiColor
- anchors.verticalCenter: parent.verticalCenter
- MouseArea {
- anchors.fill: parent
- onClicked: gridView.contentX = gridView.page
+ Repeater {
+ model: {
+ var c = gridView.count % gridViewPageItemCount
+ if (c > 0)
+ c = 1
+ return Math.floor(gridView.count / gridViewPageItemCount) + c
}
- }
- Rectangle {
- property bool active: 2 * gridView.page <= gridView.contentX
- width: 10
- visible: gridView.count > 16
- height: width
- radius: width / 2
- color: !active ? inactivePagerColor : uiColor
- anchors.verticalCenter: parent.verticalCenter
- MouseArea {
- anchors.fill: parent
- onClicked: gridView.contentX = 2 * gridView.page
+ delegate: Rectangle {
+ property bool active: index * gridView.page <= gridView.contentX && gridView.contentX < (index + 1) * gridView.page
+ width: 10
+ height: width
+ radius: width / 2
+ color: !active ? inactivePagerColor : uiColor
+ anchors.verticalCenter: parent.verticalCenter
+ MouseArea {
+ anchors.fill: parent
+ onClicked: gridView.contentX = index * gridView.page
+ }
}
}
}