aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--components/MenuButton.qml9
-rw-r--r--components/StandardButton.qml12
2 files changed, 17 insertions, 4 deletions
diff --git a/components/MenuButton.qml b/components/MenuButton.qml
index 0e33057c..23ab4f74 100644
--- a/components/MenuButton.qml
+++ b/components/MenuButton.qml
@@ -38,6 +38,13 @@ Rectangle {
property var under: null
signal clicked()
+ function doClick() {
+ // Android workaround
+ releaseFocus();
+ clicked();
+ }
+
+
function getOffset() {
var offset = 0
var item = button
@@ -139,7 +146,7 @@ Rectangle {
onClicked: {
if(parent.checked)
return
- button.clicked()
+ button.doClick()
parent.checked = true
}
}
diff --git a/components/StandardButton.qml b/components/StandardButton.qml
index c55ebb12..3954c58c 100644
--- a/components/StandardButton.qml
+++ b/components/StandardButton.qml
@@ -45,6 +45,12 @@ Item {
// Dynamic label width
Layout.minimumWidth: (label.contentWidth + 10 * scaleRatio) // (label.contentWidth > 80)? label.contentWidth + 20 : 100
+ function doClick() {
+ // Android workaround
+ releaseFocus();
+ clicked();
+ }
+
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
@@ -98,9 +104,9 @@ Item {
MouseArea {
id: buttonArea
anchors.fill: parent
- onClicked: parent.clicked()
+ onClicked: doClick()
}
- Keys.onSpacePressed: clicked()
- Keys.onReturnPressed: clicked()
+ Keys.onSpacePressed: doClick()
+ Keys.onReturnPressed: doClick()
}