@@ -22,6 +22,8 @@ ScopeSetting {
23 height: listItem.height
23 height: listItem.height
25+ property string mode: "string"
25 ListItem.Empty {
27 ListItem.Empty {
26 id: listItem
28 id: listItem
27 onClicked: {
29 onClicked: {
@@ -40,7 +42,8 @@ ScopeSetting {
41 text: widgetData.displayName
43 text: widgetData.displayName
42 elide: Text.ElideMiddle
44 elide: Text.ElideMiddle
43− color: scopeStyle ? scopeStyle.foreground : "grey"
46+ color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
46 TextField {
49 TextField {
@@ -51,12 +54,21 @@ ScopeSetting {
51 rightMargin: __margins
54 rightMargin: __margins
52 verticalCenter: parent.verticalCenter
55 verticalCenter: parent.verticalCenter
54− width: units.gu(12)
57+ width: root.mode == "number" ? units.gu(8) : units.gu(12)
55 text: widgetData.value
58 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
57 function updateText() {
67 function updateText() {
68+ if (acceptableInput) {
58− text = displayText;
69+ text = displayText;
59− root.updated(text);
70+ root.updated(text);
62 onAccepted: updateText()
74 onAccepted: updateText()