mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-05 23:04:30 +08:00
On Windows platform the qualitys slider is properly aligned CURA-4182
This commit is contained in:
parent
5832169db0
commit
879b3df816
@ -53,7 +53,7 @@ Item
|
|||||||
|
|
||||||
Component.onCompleted:
|
Component.onCompleted:
|
||||||
{
|
{
|
||||||
qualityRow.updateAvailableTotalTicks()
|
qualityRow.updateQualitySliderProperties()
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections
|
Connections
|
||||||
@ -61,17 +61,10 @@ Item
|
|||||||
target: Cura.MachineManager
|
target: Cura.MachineManager
|
||||||
onActiveQualityChanged:
|
onActiveQualityChanged:
|
||||||
{
|
{
|
||||||
qualityRow.updateAvailableTotalTicks()
|
qualityRow.updateQualitySliderProperties()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
Component.onCompleted:
|
|
||||||
{
|
|
||||||
updateCurrentQualityIndex();
|
|
||||||
updateBar();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
id: qualityRow
|
id: qualityRow
|
||||||
|
|
||||||
@ -84,7 +77,7 @@ Item
|
|||||||
property var sliderAvailableMax : 0
|
property var sliderAvailableMax : 0
|
||||||
property var sliderMarginRight : 0
|
property var sliderMarginRight : 0
|
||||||
|
|
||||||
function updateAvailableTotalTicks()
|
function updateQualitySliderProperties()
|
||||||
{
|
{
|
||||||
qualityRow.totalTicks = Cura.ProfilesModel.rowCount() - 1 // minus one, because slider starts from 0
|
qualityRow.totalTicks = Cura.ProfilesModel.rowCount() - 1 // minus one, because slider starts from 0
|
||||||
|
|
||||||
@ -142,12 +135,6 @@ Item
|
|||||||
|
|
||||||
qualityRow.sliderAvailableMin = availableMin
|
qualityRow.sliderAvailableMin = availableMin
|
||||||
qualityRow.sliderAvailableMax = availableMax
|
qualityRow.sliderAvailableMax = availableMax
|
||||||
|
|
||||||
//console.log("==>>FIND.availableMin: " + availableMin)
|
|
||||||
//console.log("==>>FIND.availableMax: " + availableMax)
|
|
||||||
//console.log("==>>FIND.qualitySliderSelectedValue: " + qualitySliderSelectedValue)
|
|
||||||
//console.log("==>>FIND.sliderMarginRightVALUE: "+ sliderMarginRight)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
height: UM.Theme.getSize("sidebar_margin").height
|
height: UM.Theme.getSize("sidebar_margin").height
|
||||||
@ -211,7 +198,7 @@ Item
|
|||||||
height: 2
|
height: 2
|
||||||
color: UM.Theme.getColor("quality_slider_unavailable")
|
color: UM.Theme.getColor("quality_slider_unavailable")
|
||||||
//radius: parent.radius
|
//radius: parent.radius
|
||||||
y: 8.5
|
anchors.verticalCenter: qualityRowSlider.verticalCenter
|
||||||
x: 0
|
x: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -256,13 +243,14 @@ Item
|
|||||||
//Draw Available line
|
//Draw Available line
|
||||||
groove: Rectangle {
|
groove: Rectangle {
|
||||||
implicitHeight: 2
|
implicitHeight: 2
|
||||||
|
anchors.verticalCenter: qualityRowSlider.verticalCenter
|
||||||
color: UM.Theme.getColor("quality_slider_available")
|
color: UM.Theme.getColor("quality_slider_available")
|
||||||
radius: 1
|
radius: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
handle: Item {
|
handle: Item {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: qualityhandleButton
|
id: qualityhandleButton
|
||||||
|
anchors.verticalCenter: qualityRowSlider.verticalCenter
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
color: control.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
|
color: control.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
|
||||||
implicitWidth: 10
|
implicitWidth: 10
|
||||||
|
Loading…
x
Reference in New Issue
Block a user