Merge pull request #12129 from SamGondelman/doubleClick

Move key logic from onClicked to onReleased
This commit is contained in:
Seth Alves 2018-01-10 18:03:23 -08:00 committed by GitHub
commit 457fcd6f40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,18 +45,6 @@ Item {
}
}
onClicked: {
mouse.accepted = true;
Tablet.playSound(TabletEnums.ButtonClick);
webEntity.synthesizeKeyPress(glyph);
webEntity.synthesizeKeyPress(glyph, mirrorText);
if (toggle) {
toggled = !toggled;
}
}
onDoubleClicked: {
mouse.accepted = true;
}
@ -94,6 +82,14 @@ Item {
onReleased: {
if (containsMouse) {
Tablet.playSound(TabletEnums.ButtonClick);
webEntity.synthesizeKeyPress(glyph);
webEntity.synthesizeKeyPress(glyph, mirrorText);
if (toggle) {
toggled = !toggled;
}
keyItem.state = "mouseOver";
} else {
if (toggled) {