feat(StatusBaseInput): add hover state visuals

Closes #285
This commit is contained in:
Pascal Precht 2021-07-23 11:57:16 +02:00 committed by Michał Cieślak
parent 11f9d2a8c5
commit 3755e1fdd6
1 changed files with 8 additions and 2 deletions

View File

@ -56,7 +56,12 @@ Item {
clip: true
border.width: 1
border.color: edit.activeFocus ? Theme.palette.primaryColor1 : "transparent"
border.color: {
if (edit.activeFocus) {
return Theme.palette.primaryColor1;
}
return sensor.containsMouse ? Theme.palette.primaryColor2 : "transparent"
}
Flickable {
id: flick
@ -132,9 +137,10 @@ Item {
} // Flickable
MouseArea {
id: sensor
hoverEnabled: true
anchors.fill: parent
cursorShape: Qt.IBeamCursor
enabled: !edit.activeFocus
onClicked: edit.forceActiveFocus()
}
} // Rectangle