mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 15:37:27 -06:00
CURA-4182 final tweaks to quality slider color and position
This commit is contained in:
parent
a7f28e688e
commit
fe5910dd96
1 changed files with 15 additions and 5 deletions
|
@ -164,10 +164,20 @@ Item
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height / 2
|
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height / 2
|
||||||
color: UM.Theme.getColor("text")
|
|
||||||
|
color: UM.Theme.getColor("quality_slider_unavailable") ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
|
||||||
text: Cura.ProfilesModel.getItem(index).layer_height_without_unit
|
text: Cura.ProfilesModel.getItem(index).layer_height_without_unit
|
||||||
width: 1
|
|
||||||
x: (index != qualityModel.totalTicks) ? (base.width * 0.55 / qualityModel.totalTicks) * index : (base.width * 0.55 / qualityModel.totalTicks) * index - 15
|
x: {
|
||||||
|
// Make sure the text aligns correctly with each tick
|
||||||
|
if (index == 0) {
|
||||||
|
return (base.width * 0.55 / qualityModel.totalTicks) * index
|
||||||
|
} else if (index == qualityModel.totalTicks) {
|
||||||
|
return (base.width * 0.55 / qualityModel.totalTicks) * index - width
|
||||||
|
} else {
|
||||||
|
return (base.width * 0.55 / qualityModel.totalTicks) * index - (width / 2)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -202,7 +212,7 @@ Item
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
color: qualityModel.count > 1 ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
|
color: Cura.ProfilesModel.getItem(index).available ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
|
||||||
width: 1
|
width: 1
|
||||||
height: 6
|
height: 6
|
||||||
y: 0
|
y: 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue