From 4da1b08e19d48a714390eb3f25c966ebf35a980d Mon Sep 17 00:00:00 2001 From: Corey Woodworth Date: Mon, 17 Nov 2025 12:57:42 -0500 Subject: [PATCH] Fix vertical centering and overflow of NSpinBox --- Widgets/NSpinBox.qml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Widgets/NSpinBox.qml b/Widgets/NSpinBox.qml index 0b15e726..9d5abfe0 100644 --- a/Widgets/NSpinBox.qml +++ b/Widgets/NSpinBox.qml @@ -38,7 +38,7 @@ RowLayout { Rectangle { id: spinBoxContainer implicitWidth: 120 - implicitHeight: (root.baseSize - 4) + implicitHeight: Math.round((root.baseSize - 4)/2)*2 radius: height * 0.5 color: Color.mSurfaceVariant border.color: (root.hovering || decreaseArea.containsMouse || increaseArea.containsMouse) ? Color.mHover : Color.mOutline @@ -83,6 +83,7 @@ RowLayout { anchors.bottom: parent.bottom anchors.left: parent.left opacity: root.enabled && root.value > root.from ? 1.0 : 0.3 + clip: true Item { id: leftSemicircle @@ -93,7 +94,7 @@ RowLayout { Rectangle { width: Math.round(parent.height) height: parent.height - radius: width / 2 + radius: Math.round(width / 2) anchors.left: parent.left color: decreaseArea.containsMouse ? Color.mHover : Color.transparent Behavior on color { @@ -178,6 +179,7 @@ RowLayout { anchors.bottom: parent.bottom anchors.right: parent.right opacity: root.enabled && root.value < root.to ? 1.0 : 0.3 + clip: true Item { id: rightSemicircle @@ -188,7 +190,7 @@ RowLayout { Rectangle { width: Math.round(parent.height) height: parent.height - radius: width / 2 + radius: Math.round(width / 2) anchors.right: parent.right color: increaseArea.containsMouse ? Color.mHover : Color.transparent Behavior on color {