Index: sources/gui/qml/components/SliderDoubleCreateTreatment.qml =================================================================== diff -u -r4fab8841b1040c8eaa406713ff9bdc8c65b7b6ac -r95a840fc93f1a2cd65732d835fad2aca0f03f28e --- sources/gui/qml/components/SliderDoubleCreateTreatment.qml (.../SliderDoubleCreateTreatment.qml) (revision 4fab8841b1040c8eaa406713ff9bdc8c65b7b6ac) +++ sources/gui/qml/components/SliderDoubleCreateTreatment.qml (.../SliderDoubleCreateTreatment.qml) (revision 95a840fc93f1a2cd65732d835fad2aca0f03f28e) @@ -53,11 +53,14 @@ property alias lowSelectedValueObjectName: _lowSelectedValue.objectName property alias highSliderObjectName: _highSlider.objectName property alias highSelectedValueObjectName: _highSelectedValue.objectName - signal lowSliderChanged() - signal highSliderChanged() - height: Variables.progressbarRectHeight - width: Variables.progressbarSmallWidth + signal lowSliderPressed() + signal lowSliderReleased() + signal highSliderPressed() + signal highSliderReleased() + + height: Variables.createTreatmentSliderHeight + width: Variables.createTreatmentSliderWidth anchors.horizontalCenter: parent.horizontalCenter color: "transparent"; @@ -88,27 +91,27 @@ anchors.left: parent.left font.pixelSize: Fonts.fontPixelFluidText color: Colors.textMain; - } Text { id: _lowSelectedValue anchors.top: parent.top anchors.right: parent.horizontalCenter - anchors.rightMargin: Variables.progressbarSmallWidth / 15 + anchors.rightMargin: Variables.createTreatmentSliderWidth / 15 text: "-- " + _lowSlider.unit font.pixelSize: Fonts.fontPixelFluidUnit color: Colors.createTreatmentInactive; - } Slider { id : _lowSlider anchors.left: parent.left; anchors.bottom: parent.bottom - width: Variables.progressbarSmallWidth / 2.3 + width: Variables.createTreatmentSliderWidth / 2.3 diameter: Variables.sliderCircleDiameter color : Colors.createTreatmentInactive - knobColor: Colors.createTreatmentInactive + handlerColor: Colors.createTreatmentInactive + touchMargin: Variables.createTreatmentSliderMargin + progressRectMargin: 0 height : 5 minimum: 0 maximum: 100 @@ -117,22 +120,22 @@ ticks : true onValueChanged: { _lowSelectedValue.text = value + " " + _root.lowUnits; - lowSliderChanged() } onActiveChanged: { if (isActive) { _lowTitle.color = Colors.textMain _lowSelectedValue.color = Colors.textMain } else { _lowSelectedValue.color = Colors.createTreatmentInactive; - } } - onProgressRectClicked: setActive(true) - onProgressRectDragged: setActive(true) - onDragged: setActive(true) - onClicked: setActive(true) + onProgressRectClicked: { setActive(true); setLowValid(true); } + onProgressRectDragged: { setActive(true); setLowValid(true); } + onPressed: { _root.lowSliderPressed(); } + onReleased: { _root.lowSliderReleased(); } + onDragged: { setActive(true); setLowValid(true); } + onClicked: { setActive(true); setLowValid(true); } } Text { @@ -142,7 +145,6 @@ anchors.left: _highSlider.left font.pixelSize: Fonts.fontPixelFluidText color: Colors.textMain; - } Text { @@ -152,16 +154,17 @@ text: "-- " + _highSlider.unit font.pixelSize: Fonts.fontPixelFluidUnit color: Colors.createTreatmentInactive; - } Slider { id : _highSlider anchors.right: parent.right; anchors.bottom: parent.bottom; - width: Variables.progressbarSmallWidth / 2.3 + width: Variables.createTreatmentSliderWidth / 2.3 diameter: Variables.sliderCircleDiameter color : Colors.createTreatmentInactive - knobColor: Colors.createTreatmentInactive + handlerColor: Colors.createTreatmentInactive + touchMargin: Variables.createTreatmentSliderMargin + progressRectMargin: 0 height : 5 minimum: 50 maximum: 100 @@ -170,7 +173,6 @@ ticks : true onValueChanged: { _highSelectedValue.text = value + " " + _root.highUnits; - highSliderChanged() } onActiveChanged: { @@ -179,12 +181,13 @@ _highSelectedValue.color = Colors.textMain } else { _highSelectedValue.color = Colors.createTreatmentInactive - } } onProgressRectClicked: { setActive(true); setHighValid(true); } onProgressRectDragged: { setActive(true); setHighValid(true); } + onPressed: { _root.highSliderPressed(); } + onReleased: { _root.highSliderReleased(); } onDragged: { setActive(true); setHighValid(true); } onClicked: { setActive(true); setHighValid(true); } }