Index: sources/gui/qml/SDItem.qml =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r768259b3c00ee3fbc5ba04475763b43cfac76bfe --- sources/gui/qml/SDItem.qml (.../SDItem.qml) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/gui/qml/SDItem.qml (.../SDItem.qml) (revision 768259b3c00ee3fbc5ba04475763b43cfac76bfe) @@ -33,6 +33,15 @@ signal clicked signal doubleClicked + readonly property int sizePowers : 1000000 + + function sdTotalConverted() { + return (_GuiView.sdTotal + /sizePowers // convert from byte to Giga byte + /1000) // round to 1000 + .toFixed(1) // round to 1 floating point + } + color : Colors.transparent anchors { top : parent.top @@ -55,10 +64,19 @@ anchors.fill: parent diameter: _root.width minimum : 0 - maximum : _GuiView.sdTotal / 1000000 // convert to MB since the value in byte is too big for ProgressCircle. - value : _GuiView.sdAvail / 1000000 // convert to MB since the value in byte is too big for ProgressCircle. + maximum : _GuiView.sdTotal / sizePowers // convert to MB since the value in byte is too big for ProgressCircle. + value : _GuiView.sdAvail / sizePowers // convert to MB since the value in byte is too big for ProgressCircle. color : ! _GuiView.sdIsReady ? "red" : _GuiView.sdIsReadOnly ? "gray" : _GuiView.sdIsLow ? Colors.red : "green" } + Text { id: _SDTotal + anchors.top: parent.bottom + anchors.horizontalCenter: parent.horizontalCenter + color : Colors.white + text : _root.sdTotalConverted() + visible : _GuiView.sdIsReady + font.pixelSize: 12 + font.bold: true + } MouseArea { id: _mouseArea anchors.fill : parent