Merge pull request #3164

1373e70 account/receive: highlight background and text of selected item (rating89us)
This commit is contained in:
luigi1111 2021-01-20 22:37:24 -05:00
commit 4098352faf
No known key found for this signature in database
GPG key ID: F4ACA0183641E010
2 changed files with 6 additions and 8 deletions

View file

@ -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)

View file

@ -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;
}
}