Commit 8f7c285f authored by Thomas BOUTROUE's avatar Thomas BOUTROUE

Fix dashboard elements

parent fae5ae38
...@@ -41,7 +41,7 @@ Item { ...@@ -41,7 +41,7 @@ Item {
id: txt; id: txt;
text: modelData ["value"]; text: modelData ["value"];
font.pixelSize: size; font.pixelSize: size;
anchors.margins: (size * 0.5); anchors.margins: (size * 0.35);
anchors.centerIn: parent; anchors.centerIn: parent;
} }
} }
......
...@@ -85,13 +85,12 @@ Item { ...@@ -85,13 +85,12 @@ Item {
underline: (display !== text); underline: (display !== text);
} }
anchors.fill: parent; anchors.fill: parent;
onAccepted: { onDisplayChanged: { text = display; }
value = number; onAccepted: { value = number; }
text = display;
}
property real number : parseFloat (text.trim ()); property real number : parseFloat (text.trim ());
property string display : ""; Binding on display { value: (!isNaN (base.value) ? base.value.toFixed (decimals) : ""); } property string display : ""; Binding on display { value: (!isNaN (base.value) ? base.value.toFixed (decimals) : ""); }
} }
} }
TextLabel { TextLabel {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment