Index: sources/gui/qml/components/ProgressBar.qml =================================================================== diff -u -rf9a99ad603189f8aafd2b913fd1d453094f00a7e -ra9c98aee00fd5339b969b353926dccf72b0d496f --- sources/gui/qml/components/ProgressBar.qml (.../ProgressBar.qml) (revision f9a99ad603189f8aafd2b913fd1d453094f00a7e) +++ sources/gui/qml/components/ProgressBar.qml (.../ProgressBar.qml) (revision a9c98aee00fd5339b969b353926dccf72b0d496f) @@ -36,88 +36,99 @@ property alias bgColor : _background.color property alias color : _highlight.color property alias colorMed : _highlightMed.color - property alias colorMarker : _progressMarker.color - property alias colorMarkerText : _progressMarker.textColor - property int margin : 2 + property color minColor : Colors.textProgressMarker + + property int margin : 1 property real radius : 2 - property int markerExtraHeight : Variables.progressMarkerExtraHeight + property alias markerColor : _progressMarker.color + property alias markerText : _progressMarker.text + property int markerHeight : Variables.progressMarkerHeight + width : parent.width height: Variables.progressbarHeight - Rectangle { id: _background - width : parent.width - height: parent.height + Background { id: _background color : Colors.backgroundProgressBar radius: _root.radius } - Rectangle { id: _highlightMed - property int widthDest: ((_root.width * (medimum - minimum)) / (maximum - minimum) - (margin * 2)) + ProgressRect { id: _highlightMed + minimum : _root.minimum + maximum : _root.maximum + value : _root.medimum - visible : medimum + margin : _root.margin + radius : _root.radius color : Colors.highlightMedProgressBar - width : widthDest - anchors { - left : parent.left - top : parent.top - bottom : parent.bottom - margins : _root.margin - } - radius: _root.radius } - Rectangle { id: _highlight - property int widthDest: ((_root.width * (value - minimum)) / (maximum - minimum) - (margin * 2)) + ProgressRect { id: _highlight + minimum : _root.minimum + maximum : _root.maximum + value : _root.value + margin : _root.margin + radius : _root.radius color : Colors.highlightProgressBar - width : widthDest - //Behavior on width { SmoothedAnimation { velocity: 1200 } } - anchors { - left : parent.left - top : parent.top - bottom : parent.bottom - margins : _root.margin - } - radius: _root.radius - } - ProgressMarker { id: _progressMarker - height : _root.height + markerExtraHeight - anchors { - left : _highlight.right - bottom : _highlight.bottom + ProgressMarker { id: _progressMarker + value : _root.value + height : _root.markerHeight + + text.font.pixelSize : Fonts.fontPixelProgressBarMarker + text.font.bold : true + + text.anchors.right : left + text.anchors.top : top + text.anchors.rightMargin: 5 + text.anchors.topMargin : -5 } - value : _root.value } Text { id: _textMed visible : medimum + + font.pixelSize : Fonts.fontPixelProgressBarRange + font.bold : true + + color : Colors.textProgressBar + text : medimum + anchors { right : _highlightMed.right - top : _root.bottom + top : parent.bottom + topMargin : Variables.progressTextMargin } - color : "white" - text : medimum } Text { id: _textMinimum + font.pixelSize : Fonts.fontPixelProgressBarRange + font.bold : true + + color : Colors.textProgressBar + text : minimum + anchors { - left : _root.left - top : _root.bottom + left : parent.left + top : parent.bottom + topMargin : Variables.progressTextMargin } - color : "white" - text : minimum } Text { id: _textMaximum + font.pixelSize : Fonts.fontPixelProgressBarRange + font.bold : true + + color : Colors.textProgressBar + text : maximum + anchors { - right : _root.right - top : _root.bottom + right : parent.right + top : parent.bottom + topMargin : Variables.progressTextMargin } - color : "white" - text : maximum } MouseArea { id: _mouseArea