1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-07-24 09:25:33 +02:00

settings: make settings spin box editable

Change-Id: I065bc0e378f3481c0afa694595c1b882cdf1254a
This commit is contained in:
Ming Rui Zhang 2020-09-14 14:03:35 -04:00 committed by Andreas Traczyk
parent 5e87b43e78
commit d426815cc6

View file

@ -61,6 +61,7 @@ RowLayout {
verticalAlignment: Text.AlignVCenter
}
// TODO: use TextField
SpinBox {
id: spinBox
@ -68,19 +69,24 @@ RowLayout {
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.alignment: Qt.AlignCenter
font.family: "Monospace"
font.pointSize: JamiTheme.buttonFontSize
font.kerning: true
from: root.bottomValue
to: root.topValue
stepSize: root.step
up.indicator.width: (width < 200) ? (width / 5) : 40
down.indicator.width: (width < 200) ? (width / 5) : 40
editable: true
up.indicator.width: 0
down.indicator.width: 0
textFromValue: function(value, locale) {
return Number(value)
}
onValueModified: {
root.valueField = value
newValue()
}
}
}
}