diff options
author | Papoteur <papoteur@mageia.org> | 2021-04-04 14:18:45 +0200 |
---|---|---|
committer | Papoteur <papoteur@mageia.org> | 2021-04-04 14:40:00 +0200 |
commit | 05e79946d678040b7b69f43844f5d83510f001da (patch) | |
tree | a262cd1aaf7bdec2810a46e0a71d8d7a11d2ed98 | |
parent | 744c8a7cb9c0e57c6f9ce8edb92c109ad4af1ecf (diff) | |
download | mageiawelcome-05e79946d678040b7b69f43844f5d83510f001da.tar mageiawelcome-05e79946d678040b7b69f43844f5d83510f001da.tar.gz mageiawelcome-05e79946d678040b7b69f43844f5d83510f001da.tar.bz2 mageiawelcome-05e79946d678040b7b69f43844f5d83510f001da.tar.xz mageiawelcome-05e79946d678040b7b69f43844f5d83510f001da.zip |
Add previous-next arrows (mga#28693)
-rw-r--r-- | qml/mw-ui.qml | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index 957923c..631852e 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -391,6 +391,68 @@ Rectangle { cacheBuffer: 200 } } + MouseArea { + id: nextMA + anchors {right: parent.right; verticalCenter: slideshow.verticalCenter } + width: 60 + height: 60 + hoverEnabled: true + onEntered: { rightArrow.state='Hovering'} + onExited: { rightArrow.state=''} + onClicked: {if (view.currentIndex < view.model.count - 1) + view.currentIndex = view.currentIndex + 1} + Rectangle { + id: rightArrow + anchors.fill: parent + color: "#80262F45" + visible: false + Text { + anchors.centerIn: parent + text: (direction == "LTR" ? ">" : "<") + font.pointSize: 30 + } + states: [ + State { + name: "Hovering" + PropertyChanges { + target: rightArrow + visible: view.currentIndex == view.model.count - 1 ? false : true + } + } + ] + } + } + MouseArea { + id: previousMA + anchors {left: parent.left; verticalCenter: slideshow.verticalCenter } + width: 60 + height: 60 + hoverEnabled: true + onEntered: { leftArrow.state='Hovering'} + onExited: { leftArrow.state=''} + onClicked: {if (view.currentIndex > 0) + view.currentIndex = view.currentIndex - 1} + Rectangle { + id: leftArrow + anchors.fill: parent + color: "#80262F45" + visible: false + Text { + anchors.centerIn: parent + text: (direction == "LTR" ? "<" : ">") + font.pointSize: 30 + } + states: [ + State { + name: "Hovering" + PropertyChanges { + target: leftArrow + visible: view.currentIndex == 0 ? false : true + } + } + ] + } + } Rectangle { id: buttonbox width: banner.width; height: buttonRow.height |