diff options
| author | rating89us <45968869+rating89us@users.noreply.github.com> | 2020-10-17 12:19:46 +0200 |
|---|---|---|
| committer | rating89us <rating89us@rating89us.com> | 2020-10-17 20:19:50 +0200 |
| commit | 1373e709d609848537a1dad6eb434d2846d9a8bb (patch) | |
| tree | b10cb0ad4aa75f15fa87de8ad51bf5a398157a3c | |
| parent | cb1f3ad0ce228b9c272df76838754e303b074a32 (diff) | |
| download | monzero-gui-1373e709d609848537a1dad6eb434d2846d9a8bb.tar.gz monzero-gui-1373e709d609848537a1dad6eb434d2846d9a8bb.tar.xz monzero-gui-1373e709d609848537a1dad6eb434d2846d9a8bb.zip | |
account/receive: highlight background and text of selected item
| -rw-r--r-- | pages/Account.qml | 7 | ||||
| -rw-r--r-- | pages/Receive.qml | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/pages/Account.qml b/pages/Account.qml index 49c06156..ca563ff8 100644 --- a/pages/Account.qml +++ b/pages/Account.qml @@ -190,7 +190,7 @@ Rectangle { height: subaddressAccountListRow.subaddressAccountListItemHeight width: parent ? parent.width : undefined Layout.fillWidth: true - color: "transparent" + color: itemMouseArea.containsMouse || index === currentAccountIndex ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent" Rectangle { color: MoneroComponents.Style.appWindowBorderColor @@ -226,7 +226,7 @@ Rectangle { MoneroComponents.Label { id: nameLabel - color: MoneroComponents.Style.dimmedFontColor + color: index === currentAccountIndex ? MoneroComponents.Style.defaultFontColor : MoneroComponents.Style.dimmedFontColor anchors.verticalCenter: parent.verticalCenter anchors.left: idLabel.right anchors.leftMargin: 6 @@ -276,11 +276,10 @@ Rectangle { } MouseArea { + id: itemMouseArea cursorShape: Qt.PointingHandCursor anchors.fill: parent hoverEnabled: true - onEntered: tableItem2.color = MoneroComponents.Style.titleBarButtonHoverColor - onExited: tableItem2.color = "transparent" onClicked: { appWindow.currentWallet.switchSubaddressAccount(index); if (selectAndSend) diff --git a/pages/Receive.qml b/pages/Receive.qml index a1fd4bd4..7e2e2215 100644 --- a/pages/Receive.qml +++ b/pages/Receive.qml @@ -107,7 +107,7 @@ Rectangle { height: subaddressListRow.subaddressListItemHeight width: parent ? parent.width : undefined Layout.fillWidth: true - color: "transparent" + color: itemMouseArea.containsMouse || index === appWindow.current_subaddress_table_index ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent" Rectangle{ anchors.right: parent.right @@ -143,7 +143,7 @@ Rectangle { MoneroComponents.Label { id: nameLabel - color: MoneroComponents.Style.dimmedFontColor + color: index === appWindow.current_subaddress_table_index ? MoneroComponents.Style.defaultFontColor : MoneroComponents.Style.dimmedFontColor anchors.verticalCenter: parent.verticalCenter anchors.left: idLabel.right anchors.leftMargin: 6 @@ -167,11 +167,10 @@ Rectangle { } MouseArea { + id: itemMouseArea cursorShape: Qt.PointingHandCursor anchors.fill: parent hoverEnabled: true - onEntered: tableItem2.color = MoneroComponents.Style.titleBarButtonHoverColor - onExited: tableItem2.color = "transparent" onClicked: subaddressListView.currentIndex = index; } } |
