mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-28 18:56:32 +02:00
StandardButton: indicating "focused" state
This commit is contained in:
parent
7973d0cbcc
commit
513f7ebc3a
@ -41,6 +41,7 @@ Item {
|
|||||||
property alias text: label.text
|
property alias text: label.text
|
||||||
signal clicked()
|
signal clicked()
|
||||||
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
@ -51,6 +52,9 @@ Item {
|
|||||||
parent.enabled ? (buttonArea.pressed ? parent.shadowPressedColor : parent.shadowReleasedColor)
|
parent.enabled ? (buttonArea.pressed ? parent.shadowPressedColor : parent.shadowReleasedColor)
|
||||||
: Qt.lighter(parent.shadowReleasedColor)
|
: Qt.lighter(parent.shadowReleasedColor)
|
||||||
}
|
}
|
||||||
|
border.color: Qt.darker(parent.releasedColor)
|
||||||
|
border.width: parent.focus ? 1 : 0
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@ -64,6 +68,8 @@ Item {
|
|||||||
|
|
||||||
}
|
}
|
||||||
//radius: 4
|
//radius: 4
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
@ -92,4 +98,7 @@ Item {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: parent.clicked()
|
onClicked: parent.clicked()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Keys.onSpacePressed: clicked()
|
||||||
|
Keys.onReturnPressed: clicked()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user