From 70e3c2d3ad20b149da641694359101408ba3204e Mon Sep 17 00:00:00 2001 From: rating89us <45968869+rating89us@users.noreply.github.com> Date: Tue, 7 Dec 2021 23:49:35 +0100 Subject: Settings, Advanced: mirror stack transition when clicking on a button on the left --- components/Navbar.qml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'components') 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 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() + } } } -- cgit v1.2.3