diff --git a/Widgets/NSlider.qml b/Widgets/NSlider.qml index 29ea2dbb4..372110229 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 1381213b0..9be415761 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