summaryrefslogtreecommitdiffstats
path: root/qml/mw-ui.qml
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2021-04-04 14:18:45 +0200
committerPapoteur <papoteur@mageia.org>2021-04-04 14:40:00 +0200
commit05e79946d678040b7b69f43844f5d83510f001da (patch)
treea262cd1aaf7bdec2810a46e0a71d8d7a11d2ed98 /qml/mw-ui.qml
parent744c8a7cb9c0e57c6f9ce8edb92c109ad4af1ecf (diff)
downloadmageiawelcome-05e79946d678040b7b69f43844f5d83510f001da.tar
mageiawelcome-05e79946d678040b7b69f43844f5d83510f001da.tar.gz
mageiawelcome-05e79946d678040b7b69f43844f5d83510f001da.tar.bz2
mageiawelcome-05e79946d678040b7b69f43844f5d83510f001da.tar.xz
mageiawelcome-05e79946d678040b7b69f43844f5d83510f001da.zip
Add previous-next arrows (mga#28693)
Diffstat (limited to 'qml/mw-ui.qml')
-rw-r--r--qml/mw-ui.qml62
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