HButton: reduce hover/press overlay opacity

This commit is contained in:
miruka 2019-05-08 13:26:10 -04:00
parent a672b725de
commit af8c0c6811

View File

@ -106,7 +106,7 @@ Button {
onClicked: button.clicked() onClicked: button.clicked()
onDoubleClicked: button.doubleClicked() onDoubleClicked: button.doubleClicked()
onEntered: { onEntered: {
overlayOpacity = checked ? 0 : 0.3 overlayOpacity = checked ? 0 : 0.2
button.entered() button.entered()
} }
onExited: { onExited: {
@ -115,12 +115,12 @@ Button {
} }
onPressAndHold: button.pressAndHold() onPressAndHold: button.pressAndHold()
onPressed: { onPressed: {
overlayOpacity += 0.3 overlayOpacity += 0.2
button.pressed() button.pressed()
} }
onReleased: { onReleased: {
if (checkable) { checked = ! checked } if (checkable) { checked = ! checked }
overlayOpacity = checked ? 0 : 0.3 overlayOpacity = checked ? 0 : 0.2
button.released() button.released()
} }
} }