aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorrating89us <45968869+rating89us@users.noreply.github.com>2021-12-07 23:49:35 +0100
committerrating89us <45968869+rating89us@users.noreply.github.com>2021-12-08 13:00:10 +0100
commit70e3c2d3ad20b149da641694359101408ba3204e (patch)
tree70fbdfe808ca7007124dbfe18e1ff5a1621f24bc /components
parentbddb9b0050ee086da5c7ee7fdb3627e0dff9f179 (diff)
downloadmonzero-gui-70e3c2d3ad20b149da641694359101408ba3204e.tar.gz
monzero-gui-70e3c2d3ad20b149da641694359101408ba3204e.tar.xz
monzero-gui-70e3c2d3ad20b149da641694359101408ba3204e.zip
Settings, Advanced: mirror stack transition when clicking on a button on the left
Diffstat (limited to 'components')
-rw-r--r--components/Navbar.qml11
1 files changed, 10 insertions, 1 deletions
diff --git a/components/Navbar.qml b/components/Navbar.qml
index f7a55abf..3ea7c07a 100644
--- a/components/Navbar.qml
+++ b/components/Navbar.qml
@@ -32,6 +32,8 @@ import "." as MoneroComponents
Rectangle {
default property list<MoneroComponents.NavbarItem> items
+ property alias currentIndex: repeater.currentIndex
+ property alias previousIndex: repeater.previousIndex
color: "transparent"
height: grid.height
@@ -100,7 +102,10 @@ Rectangle {
}
Repeater {
+ id: repeater
model: items.length
+ property int currentIndex: 0
+ property int previousIndex: 0
RowLayout {
spacing: 0
@@ -149,7 +154,11 @@ Rectangle {
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
- onClicked: items[index].selected()
+ onClicked: {
+ repeater.previousIndex = repeater.currentIndex;
+ repeater.currentIndex = index;
+ items[index].selected()
+ }
}
}