mobile/UI: open dropdown on any tap for readonly combo box
This seems more intuitive. For editable combo boxes you need to tap on the indicator, but for non-editable (readonly) ones, you can tap anywhere and the dropdown is shown. The code feels a bit clumsy, but seems to work in all cases. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
bda1f0b6e1
commit
336decd30c
@ -57,6 +57,15 @@ ComboBox {
|
||||
font: cb.font
|
||||
color: subsurfaceTheme.textColor
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
onPressed: {
|
||||
if (readOnly) {
|
||||
if (cb.popup.opened) {
|
||||
cb.popup.close()
|
||||
} else {
|
||||
cb.popup.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user