mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mobile/UI: ensure active input field stays visible
This reuses the logic we implemented in the SsrfTextField. Eventually we will need to clean up the inconsistent names for these elements. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f503e5a9c2
commit
7ed32e3a49
2 changed files with 12 additions and 1 deletions
|
@ -10,6 +10,7 @@ ComboBox {
|
|||
Layout.preferredHeight: Kirigami.Units.gridUnit * 2.5
|
||||
inputMethodHints: Qt.ImhNoPredictiveText
|
||||
font.pointSize: subsurfaceTheme.regularPointSize
|
||||
property var flickable // used to ensure the combobox is visible on screen
|
||||
delegate: ItemDelegate {
|
||||
width: cb.width
|
||||
contentItem: Text {
|
||||
|
@ -47,10 +48,11 @@ ComboBox {
|
|||
}
|
||||
}
|
||||
|
||||
contentItem: TextField {
|
||||
contentItem: SsrfTextField {
|
||||
readOnly: !cb.editable
|
||||
anchors.right: indicator.left
|
||||
anchors.left: cb.left
|
||||
flickable: cb.flickable
|
||||
leftPadding: Kirigami.Units.smallSpacing
|
||||
rightPadding: Kirigami.Units.smallSpacing
|
||||
text: readOnly ? cb.displayText : cb.editText
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue