From aa1cea8d03ae39ff171db7b7fc295f9920b801ee Mon Sep 17 00:00:00 2001 From: Corey Woodworth Date: Fri, 26 Sep 2025 15:30:16 -0400 Subject: [PATCH] Fix: Fix the vertical alignment of circles --- Widgets/NSlider.qml | 8 ++++---- Widgets/NToggle.qml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Widgets/NSlider.qml b/Widgets/NSlider.qml index 29ea2dbb..37211022 100644 --- a/Widgets/NSlider.qml +++ b/Widgets/NSlider.qml @@ -105,16 +105,16 @@ Slider { } handle: Item { - width: knob.implicitWidth - height: knob.implicitHeight + width: knobDiameter + height: knobDiameter x: root.leftPadding + Math.round(root.visualPosition * (root.availableWidth - width)) - y: root.topPadding + root.availableHeight / 2 - height / 2 + y: root.topPadding + Math.round(root.availableHeight / 2 - height / 2) Rectangle { id: knob implicitWidth: knobDiameter implicitHeight: knobDiameter - radius: width * 0.5 + radius: width / 2 color: root.pressed ? Color.mTertiary : Color.mSurface border.color: Color.mPrimary border.width: Math.max(1, Style.borderL * scaling) diff --git a/Widgets/NToggle.qml b/Widgets/NToggle.qml index 1381213b..9be41576 100644 --- a/Widgets/NToggle.qml +++ b/Widgets/NToggle.qml @@ -48,7 +48,7 @@ RowLayout { Rectangle { implicitWidth: Math.round((root.baseSize * 0.8) * scaling) - implicitHeight: Math.round((root.baseSize * 0.8) * scaling) + height: parent.height - (2 * scaling * 2) radius: height * 0.5 color: root.checked ? Color.mOnPrimary : Color.mPrimary border.color: root.checked ? Color.mSurface : Color.mSurface