Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2022-04-26 16:36:20 +0300
committerGitHub <noreply@github.com>2022-04-26 16:36:20 +0300
commita57c358a046ab396305d755ceb5cfe41eb591a19 (patch)
treebd6d41f341744db6d17fe8184ea350747c76a3b7 /resources/qml
parent15d1ded3658f3ed8bfee1134922e8a38833c259c (diff)
parent049ab09119bb1f684d3d856085466528d1d79549 (diff)
Merge pull request #11979 from Ultimaker/CURA-9203_infill_percentages_not_lining_up
[CURA-9203] Infill selector misaligned
Diffstat (limited to 'resources/qml')
-rw-r--r--resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml9
1 files changed, 6 insertions, 3 deletions
diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml
index 863e8c3900..625629c810 100644
--- a/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml
+++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml
@@ -101,7 +101,8 @@ Item
{
id: backgroundLine
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.verticalCenter: parent.verticalCenter
color: infillSlider.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
@@ -120,8 +121,10 @@ Item
anchors.verticalCenter: parent.verticalCenter
// 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))))
- radius: Math.round(backgroundLine.implicitWidth / 2)
+ // (space between steps) * index of step
+ x: (backgroundLine.width / (repeater.count - 1)) * index
+
+ radius: Math.round(implicitWidth / 2)
visible: (index % 10) == 0 // Only show steps of 10%
UM.Label