Index: sources/gui/qml/components/TimeText.qml =================================================================== diff -u -r56e378f7504701b9e9a9dccaf205aef2fd52c58e -r741b1c70f851810f2c265cdd38dfa158b7ee0c37 --- sources/gui/qml/components/TimeText.qml (.../TimeText.qml) (revision 56e378f7504701b9e9a9dccaf205aef2fd52c58e) +++ sources/gui/qml/components/TimeText.qml (.../TimeText.qml) (revision 741b1c70f851810f2c265cdd38dfa158b7ee0c37) @@ -28,6 +28,11 @@ objectName: "_TimeText" //SquishQt testability property int seconds : 0 property bool secondsVisible : true + + property bool hourZero : true + property bool minuteZero : true + property bool secondZero : true + property color textColor : "white" property int textPixelSize : 90 property int textWeight : Font.ExtraLight @@ -45,9 +50,9 @@ property int second : seconds % 60 property string separator : ":" - property string hourText : (hour < 10 ? "0" + hour : hour ) - property string minuteText : (minute < 10 ? "0" + minute : minute) - property string secondText : (second < 10 ? "0" + second : second) + property string hourText : (hour < 10 ? ( _root.hourZero ? "0" : "") + hour : hour ) + property string minuteText : (minute < 10 ? ( _root.minuteZero ? "0" : "") + minute : minute) + property string secondText : (second < 10 ? ( _root.secondZero ? "0" : "") + second : second) property string time : hourText + separator + minuteText + (_root.secondsVisible ? (separator + secondText) : "") } @@ -74,7 +79,6 @@ horizontalAlignment: Text.AlignRight anchors.right : _timeSeparator.left anchors.baseline: _timeSeparator.baseline - } Text { id: _minuteText objectName: "_TimeText_minute" //SquishQt testability