From 2ea00fffa54efdd80424b883febdf62d03580d22 Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Sun, 14 Sep 2025 12:22:26 -0400 Subject: [PATCH] NSlider: simplification, no Halo + some rounding --- Widgets/NSlider.qml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/Widgets/NSlider.qml b/Widgets/NSlider.qml index 56216c9..44d8f2c 100644 --- a/Widgets/NSlider.qml +++ b/Widgets/NSlider.qml @@ -12,9 +12,9 @@ Slider { property bool snapAlways: true property real heightRatio: 0.75 - readonly property real knobDiameter: Style.baseWidgetSize * heightRatio * scaling + readonly property real knobDiameter: Math.round(Style.baseWidgetSize * heightRatio * scaling) readonly property real trackHeight: knobDiameter * 0.5 - readonly property real cutoutExtra: Style.baseWidgetSize * 0.1 * scaling + readonly property real cutoutExtra: Math.round(Style.baseWidgetSize * 0.1 * scaling) snapMode: snapAlways ? Slider.SnapAlways : Slider.SnapOnRelease implicitHeight: Math.max(trackHeight, knobDiameter) @@ -72,7 +72,7 @@ Slider { implicitWidth: knobDiameter implicitHeight: knobDiameter radius: width * 0.5 - color: root.pressed ? Color.mSurfaceVariant : Color.mSurface + color: root.pressed ? Color.mTertiary : Color.mSurface border.color: Color.mPrimary border.width: Math.max(1, Style.borderL * scaling) @@ -82,15 +82,6 @@ Slider { } } - // Press feedback halo (using accent color, low opacity) - Rectangle { - anchors.centerIn: parent - width: parent.width + 8 * scaling - height: parent.height + 8 * scaling - radius: width / 2 - color: Color.mPrimary - opacity: root.pressed ? 0.16 : 0.0 - } } } }