From f2524db882954c9c8a04bc021786229fd36d7d00 Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Tue, 13 Apr 2021 12:28:37 +0200 Subject: [PATCH] fix(Wallet): introduce hover effect for wallet accounts --- ui/app/AppLayouts/Wallet/LeftTab.qml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ui/app/AppLayouts/Wallet/LeftTab.qml b/ui/app/AppLayouts/Wallet/LeftTab.qml index 00c086ca17..bd17f24e65 100644 --- a/ui/app/AppLayouts/Wallet/LeftTab.qml +++ b/ui/app/AppLayouts/Wallet/LeftTab.qml @@ -75,10 +75,19 @@ Rectangle { Rectangle { property bool selected: index === selectedAccount + property bool hovered id: rectangle height: 64 - color: selected ? Style.current.menuBackgroundActive : Style.current.transparent + color: { + if (selected) { + return Style.current.menuBackgroundActive + } + if (hovered) { + return Style.current.backgroundHoverLight + } + return Style.current.transparent + } radius: Style.current.radius anchors.right: parent.right anchors.rightMargin: Style.current.padding @@ -143,7 +152,14 @@ Rectangle { } MouseArea { anchors.fill: parent + hoverEnabled: true cursorShape: Qt.PointingHandCursor + onEntered: { + rectangle.hovered = true + } + onExited: { + rectangle.hovered = false + } onClicked: { changeSelectedAccount(index) }