uiux(Wallet): introduce hover state for tab buttons

Closes #1630
This commit is contained in:
Pascal Precht 2021-01-12 12:40:48 +01:00 committed by Iuri Matias
parent 7fe54a1182
commit 8afcacfa6a
1 changed files with 11 additions and 9 deletions

View File

@ -6,7 +6,6 @@ TabButton {
property string btnText: "Default Button"
property string tabColor: Style.current.blue
id: tabButton
width: tabBtnText.width
height: tabBtnText.height + 11
@ -22,21 +21,24 @@ TabButton {
text: btnText
font.weight: Font.Medium
font.pixelSize: 15
color: parent.checked ? Style.current.textColor : Style.current.darkGrey
color: parent.checked || parent.hovered ? Style.current.textColor : Style.current.darkGrey
}
Rectangle {
visible: parent.checked
color: tabColor
visible: parent.checked || parent.hovered
color: parent.checked ? tabColor : Style.current.secondaryBackground
anchors.bottom: parent.bottom
anchors.bottomMargin: 0
anchors.right: parent.right
anchors.rightMargin: 4
anchors.left: parent.left
anchors.leftMargin: 4
width: 40
anchors.horizontalCenter: parent.horizontalCenter
height: 3
radius: 4
}
MouseArea {
cursorShape: Qt.PointingHandCursor
anchors.fill: parent
onPressed: mouse.accepted = false
}
}
/*##^##