mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 23:23:23 +00:00
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
1 changed files with 9 additions and 0 deletions
|
@ -57,6 +57,15 @@ ComboBox {
|
||||||
font: cb.font
|
font: cb.font
|
||||||
color: subsurfaceTheme.textColor
|
color: subsurfaceTheme.textColor
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
onPressed: {
|
||||||
|
if (readOnly) {
|
||||||
|
if (cb.popup.opened) {
|
||||||
|
cb.popup.close()
|
||||||
|
} else {
|
||||||
|
cb.popup.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
|
|
Loading…
Add table
Reference in a new issue