mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mobile UI: make TemplateComboBox selectively editable
Getting the visual right is really hard. The anchors seem to mostly work, but it still doesn't look exactly right, IMHO. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ee0ca3995e
commit
83acb98886
1 changed files with 6 additions and 3 deletions
|
@ -46,14 +46,16 @@ ComboBox {
|
|||
}
|
||||
}
|
||||
|
||||
contentItem: Text {
|
||||
contentItem: TextField {
|
||||
readOnly: !cb.editable
|
||||
anchors.right: indicator.left
|
||||
anchors.left: cb.left
|
||||
leftPadding: Kirigami.Units.smallSpacing
|
||||
rightPadding: cb.indicator.width + cb.spacing
|
||||
rightPadding: Kirigami.Units.smallSpacing
|
||||
text: cb.displayText
|
||||
font: cb.font
|
||||
color: subsurfaceTheme.textColor
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
|
@ -61,6 +63,7 @@ ComboBox {
|
|||
border.width: cb.visualFocus ? 2 : 1
|
||||
color: subsurfaceTheme.backgroundColor
|
||||
radius: 2
|
||||
visible: cb.focus
|
||||
}
|
||||
|
||||
popup: Popup {
|
||||
|
|
Loading…
Add table
Reference in a new issue