Index: sources/gui/qml/components/RangeRect.qml =================================================================== diff -u -rbbbd9cbf805779ef498a8f59cc74b9b597802a55 -r5f6975c6ee7823fc884328418298128cdb97107f --- sources/gui/qml/components/RangeRect.qml (.../RangeRect.qml) (revision bbbd9cbf805779ef498a8f59cc74b9b597802a55) +++ sources/gui/qml/components/RangeRect.qml (.../RangeRect.qml) (revision 5f6975c6ee7823fc884328418298128cdb97107f) @@ -42,8 +42,8 @@ property string unit : "" property real touchMargin: 0 - property bool isRoundedEnds : false - property bool hasBorder : false + property bool isRoundedEnds : true + property bool hasBorder : true color : Colors.backgroundRangeRect radius : isRoundedEnds ? (height/2) : Variables.rangeRectRadius Index: sources/gui/qml/components/RangeSlider.qml =================================================================== diff -u -rdf8cd7f15c5647a2d5955be0e548ef2b9d77abaf -r5f6975c6ee7823fc884328418298128cdb97107f --- sources/gui/qml/components/RangeSlider.qml (.../RangeSlider.qml) (revision df8cd7f15c5647a2d5955be0e548ef2b9d77abaf) +++ sources/gui/qml/components/RangeSlider.qml (.../RangeSlider.qml) (revision 5f6975c6ee7823fc884328418298128cdb97107f) @@ -279,7 +279,7 @@ step : _root.step stepSnap : _root.stepSnap textColor : _root.color - length : _rangeRect.height + lineTickMarkHeight: _rangeRect.height isTickMarkRound : _root.isTickMarksRound yDisplacement : _root.isTickMarksRound ? (-_rangeRect.height) : 0 } Index: sources/gui/qml/components/Slider.qml =================================================================== diff -u -r839893734937449efb6e7c31787d2c44515b69af -r5f6975c6ee7823fc884328418298128cdb97107f --- sources/gui/qml/components/Slider.qml (.../Slider.qml) (revision 839893734937449efb6e7c31787d2c44515b69af) +++ sources/gui/qml/components/Slider.qml (.../Slider.qml) (revision 5f6975c6ee7823fc884328418298128cdb97107f) @@ -54,8 +54,10 @@ function setActive(active) { if (active) { + color = Colors.sliderHighlightColor handlerColor = Colors.createTreatmentActive } else { + color = Colors.createTreatmentInactive handlerColor = Colors.createTreatmentInactive } @@ -148,32 +150,25 @@ } } - Rectangle { id: _progressRectBackground - anchors.fill : _progressRect - color : _root.isActive ? Colors.sliderHighlightColor : Colors.createTreatmentInactive - radius : _root.isRoundedEnds ? (height/2) : 0 - } - // used loader for performance since it may not always be required. // and can be a heavy Component Loader { id: _ticksLoader active : ticks anchors.fill : parent sourceComponent : TickMarks { - thickness : _root.tickMarksThickness decimal : _root.decimal minimum : _root.minimum maximum : _root.maximum step : _root.step stepSnap : _root.stepSnap textColor : _root.color - length : _progressRect.height + lineTickMarkHeight : _progressRect.height + lineTickMarkThickness : _root.tickMarksThickness isTickMarkRound : _root.isRoundedEnds yDisplacement : _root.isRoundedEnds ? (-_progressRect.height) : 0 } } ProgressRect { id: _progressRect - property real previousSliderValue: Number.NaN color : Colors.transparent decimal : _root.decimal minimum : _root.minimum Index: sources/gui/qml/components/TickMarks.qml =================================================================== diff -u -rbbbd9cbf805779ef498a8f59cc74b9b597802a55 -r5f6975c6ee7823fc884328418298128cdb97107f --- sources/gui/qml/components/TickMarks.qml (.../TickMarks.qml) (revision bbbd9cbf805779ef498a8f59cc74b9b597802a55) +++ sources/gui/qml/components/TickMarks.qml (.../TickMarks.qml) (revision 5f6975c6ee7823fc884328418298128cdb97107f) @@ -35,92 +35,48 @@ property color color : Colors.backgroundDialog - property int orientation : Line.Orientation.Vertical - property int length : parent.height - property int thickness : 1 - property bool isTickMarkRound : false property real roundTickMarkDiameter : Variables.sliderDefaultRoundTickMarkDiameter property real yDisplacement : 0 property bool showFirstMark : true + // For the case that the tickmark is a line + property real lineTickMarkHeight : 20 + property real lineTickMarkThickness : 1 + property bool textVisible : false property color textColor : Colors.textMain anchors.fill: parent Repeater { id : _repeater + model: (maximum - minimum) / step + 1 - model: (maximum - minimum) / step // + 1 - - // TODO determine if using loader is ideal or prefer to use a single Rectangle that can be transformed into line or circle - Loader { + Rectangle { property int gap : stepSnap ? ( - (parent.width * (step - (minimum % step))) / (maximum - minimum) + (parent.width * (step - (minimum % step))) / (maximum - minimum) ) : 0 - property real componentX : (((index * step) * (parent.width - parent.x)) / (maximum - minimum)) + gap - property real componentY : _root.yDisplacement - - property int repeaterIndex: index - - sourceComponent: isTickMarkRound ? _roundTickMarkFactory : _lineTickMarkFactory - } - } - - Component { - id: _roundTickMarkFactory - // The round style tick marks - - // TODO need to determine if pre-existing "Circle.qml" component can be used here in place - Rectangle{ - visible : (repeaterIndex > 0) || (repeaterIndex === 0 && showFirstMark) - x : componentX - width/2 - y : componentY - color : _root.color - height : _root.roundTickMarkDiameter - width : _root.roundTickMarkDiameter - radius : _root.roundTickMarkDiameter - - Loader{ - readonly property int tickIndex: repeaterIndex - sourceComponent: textVisible ? _tickLabelFactory : undefined - } - } - } - - Component { - id: _lineTickMarkFactory - // The Line style tick marks - Line { - visible : (repeaterIndex > 0) || (repeaterIndex === 0 && showFirstMark) - x : componentX - width/2 - y : componentY + Variables.rangeRectBorderWidth // adjusting the y of the line tick to account for the slider border + visible : (index > 0) || (index === 0 && showFirstMark) + x : (((index * step) * (parent.width - parent.x)) / (maximum - minimum)) + gap - width/2 + y : _root.yDisplacement + Variables.rangeRectBorderWidth // adjusting the y of the line tick to account for the slider border color : _root.color - orientation : _root.orientation - thickness : _root.thickness - length : _root.length - (Variables.rangeRectBorderWidth * 2) - Loader{ - readonly property int tickIndex: repeaterIndex - sourceComponent: textVisible ? _tickLabelFactory : undefined - } - } - } + height : isTickMarkRound ? _root.roundTickMarkDiameter : _root.lineTickMarkHeight + width : isTickMarkRound ? _root.roundTickMarkDiameter : _root.lineTickMarkThickness + radius : isTickMarkRound ? _root.roundTickMarkDiameter : 0 - Component { - id: _tickLabelFactory - // The value labels underneath the tick marks - Text { id : _text - visible: true - color: _root.textColor - font.pixelSize: 10 - text: ((tickIndex * step) + minimum).toFixed(decimal) - anchors { - top: parent.bottom - topMargin: 5 - horizontalCenter: parent.horizontalCenter + Text { id : _text + visible: _root.textVisible + color: _root.textColor + font.pixelSize: 10 + text: ((index * step) + minimum).toFixed(decimal) + anchors { + top: parent.bottom + topMargin: 5 + horizontalCenter: parent.horizontalCenter + } } } } Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -rbbbd9cbf805779ef498a8f59cc74b9b597802a55 -r5f6975c6ee7823fc884328418298128cdb97107f --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision bbbd9cbf805779ef498a8f59cc74b9b597802a55) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 5f6975c6ee7823fc884328418298128cdb97107f) @@ -194,6 +194,9 @@ // Saline readonly property int salinePrecision : 1 + // Dialysate Temperature + readonly property int dialysateTempPrecision : 1 + function sizeConverted(vSize, vSizePowers, vRound = 2) { return ( vSize / vSizePowers // convert from byte to Giga byte Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml =================================================================== diff -u -rdf8cd7f15c5647a2d5955be0e548ef2b9d77abaf -r5f6975c6ee7823fc884328418298128cdb97107f --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision df8cd7f15c5647a2d5955be0e548ef2b9d77abaf) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 5f6975c6ee7823fc884328418298128cdb97107f) @@ -369,6 +369,7 @@ label : qsTr("Dialysate Temperature") flickable : _flickable unit : Variables.unitTextTemperature + decimal : Variables.dialysateTempPrecision minimum : vTreatmentRanges.dialysateTempMin maximum : vTreatmentRanges.dialysateTempMax step : vTreatmentRanges.dialysateTempRes @@ -423,7 +424,7 @@ // slider visuals showTickmarks : true isRoundedEnds : true - isTickMarksRound: false + isTickMarksRound: true // Texts lowerText.visible : true