Index: sources/gui/qml/components/ProgressBar.qml =================================================================== diff -u -ra9c98aee00fd5339b969b353926dccf72b0d496f -r00e025a5d672cae66e592608792c17d98be54d19 --- sources/gui/qml/components/ProgressBar.qml (.../ProgressBar.qml) (revision a9c98aee00fd5339b969b353926dccf72b0d496f) +++ sources/gui/qml/components/ProgressBar.qml (.../ProgressBar.qml) (revision 00e025a5d672cae66e592608792c17d98be54d19) @@ -23,118 +23,53 @@ /*! * \brief Denali project ProgressBar */ -Item { id: _root +RangeRect { id: _root + property alias value : _progressRect.value + property alias valueEx : _progressRectEx.value - signal clicked() + property alias color : _progressRect.color + property alias bgColor : _root.color - property int minimum : 0 - property int maximum : 100 - property int medimum : 0 // Median + property alias markerHeight: _progressMarker.height - property int value : 0 + height : Variables.progressbarHeight - property alias bgColor : _background.color - property alias color : _highlight.color - property alias colorMed : _highlightMed.color + minimum : 0 + maximum : 0 - property color minColor : Colors.textProgressMarker + minText.visible : true + maxText.visible : true - property int margin : 1 - property real radius : 2 - property alias markerColor : _progressMarker.color - property alias markerText : _progressMarker.text - property int markerHeight : Variables.progressMarkerHeight + ProgressRect { id: _progressRectEx + visible : value - width : parent.width - height: Variables.progressbarHeight - - Background { id: _background - color : Colors.backgroundProgressBar - radius: _root.radius - } - - ProgressRect { id: _highlightMed minimum : _root.minimum maximum : _root.maximum - value : _root.medimum + value : _root.valueEx - margin : _root.margin - radius : _root.radius color : Colors.highlightMedProgressBar + maxText.visible: visible + margin : 0 } - ProgressRect { id: _highlight + ProgressRect { id: _progressRect minimum : _root.minimum maximum : _root.maximum value : _root.value - margin : _root.margin - radius : _root.radius color : Colors.highlightProgressBar ProgressMarker { id: _progressMarker - value : _root.value - height : _root.markerHeight - + value : _root.value + height : Variables.progressMarkerHeight text.font.pixelSize : Fonts.fontPixelProgressBarMarker text.font.bold : true - + // preferred positioning the marker text.anchors.right : left text.anchors.top : top - text.anchors.rightMargin: 5 + text.anchors.rightMargin: 5 text.anchors.topMargin : -5 } } - - Text { id: _textMed - visible : medimum - - font.pixelSize : Fonts.fontPixelProgressBarRange - font.bold : true - - color : Colors.textProgressBar - text : medimum - - anchors { - right : _highlightMed.right - top : parent.bottom - topMargin : Variables.progressTextMargin - } - } - - Text { id: _textMinimum - font.pixelSize : Fonts.fontPixelProgressBarRange - font.bold : true - - color : Colors.textProgressBar - text : minimum - - anchors { - left : parent.left - top : parent.bottom - topMargin : Variables.progressTextMargin - } - } - - Text { id: _textMaximum - font.pixelSize : Fonts.fontPixelProgressBarRange - font.bold : true - - color : Colors.textProgressBar - text : maximum - - anchors { - right : parent.right - top : parent.bottom - topMargin : Variables.progressTextMargin - } - } - - MouseArea { id: _mouseArea - anchors.fill: _background - onClicked: { - _root.clicked - } - } }