mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 03:59:38 +00:00
components android focus workaround
This commit is contained in:
parent
b6f268d3a5
commit
f605793cfc
2 changed files with 17 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue