mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-20 16:49:20 +08:00
I've changed the dot radius so they are circles again.
I've simplified the dot spacing logic a bit. For some reason the background does not line up perfectly with the slider. So when it is set to 0 there is still a slight offset on the slider handle. CURA-9203
This commit is contained in:
parent
0213a3833c
commit
049ab09119
@ -101,7 +101,8 @@ Item
|
|||||||
{
|
{
|
||||||
id: backgroundLine
|
id: backgroundLine
|
||||||
height: UM.Theme.getSize("print_setup_slider_groove").height
|
height: UM.Theme.getSize("print_setup_slider_groove").height
|
||||||
width: infillSlider.width - UM.Theme.getSize("print_setup_slider_handle").width
|
width: parent.width - UM.Theme.getSize("print_setup_slider_handle").width
|
||||||
|
implicitWidth: width
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
color: infillSlider.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
|
color: infillSlider.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
|
||||||
@ -120,8 +121,10 @@ Item
|
|||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
// Do not use Math.round otherwise the tickmarks won't be aligned
|
// Do not use Math.round otherwise the tickmarks won't be aligned
|
||||||
x: ((handleButton.width / 2) - (backgroundLine.implicitWidth / 2) + (index * ((repeater.width - handleButton.width) / (repeater.count-1))))
|
// (space between steps) * index of step
|
||||||
radius: Math.round(backgroundLine.implicitWidth / 2)
|
x: (backgroundLine.width / (repeater.count - 1)) * index
|
||||||
|
|
||||||
|
radius: Math.round(implicitWidth / 2)
|
||||||
visible: (index % 10) == 0 // Only show steps of 10%
|
visible: (index % 10) == 0 // Only show steps of 10%
|
||||||
|
|
||||||
UM.Label
|
UM.Label
|
||||||
|
Loading…
x
Reference in New Issue
Block a user