@@ -22,6 +22,8 @@ ScopeSetting {
2222 id: root
2323 height: listItem.height
2424
25+ property string mode: "string"
26+
2527 ListItem.Empty {
2628 id: listItem
2729 onClicked: {
@@ -40,7 +42,8 @@ ScopeSetting {
4042 }
4143 text: widgetData.displayName
4244 elide: Text.ElideMiddle
43− color: scopeStyle ? scopeStyle.foreground : "grey"
45+ maximumLineCount: 1
46+ color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
4447 }
4548
4649 TextField {
@@ -51,12 +54,21 @@ ScopeSetting {
5154 rightMargin: __margins
5255 verticalCenter: parent.verticalCenter
5356 }
54− width: units.gu(12)
57+ width: root.mode == "number" ? units.gu(8) : units.gu(12)
5558 text: widgetData.value
59+ color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.fieldText
60+ validator: root.mode == "number" ? doubleValidator : null
61+ hasClearButton: root.mode == "number" ? false : true
62+
63+ DoubleValidator {
64+ id: doubleValidator
65+ }
5666
5767 function updateText() {
58− text = displayText;
59− root.updated(text);
68+ if (acceptableInput) {
69+ text = displayText;
70+ root.updated(text);
71+ }
6072 }
6173
6274 onAccepted: updateText()