From 593a0bfc2cfef9a4f0337e4c6bc4ce7660f81478 Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Mon, 15 Sep 2025 21:36:09 -0400 Subject: [PATCH] NColorPicker: sizing improvements --- Widgets/NColorPicker.qml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Widgets/NColorPicker.qml b/Widgets/NColorPicker.qml index 92525dd..c638e44 100644 --- a/Widgets/NColorPicker.qml +++ b/Widgets/NColorPicker.qml @@ -13,7 +13,7 @@ Rectangle { signal colorSelected(color color) implicitWidth: 150 * scaling - implicitHeight: 40 * scaling + implicitHeight: Math.round(Style.baseWidgetSize * 1.1 * scaling) radius: Style.radiusM * scaling color: Color.mSurface @@ -40,12 +40,16 @@ Rectangle { RowLayout { anchors.fill: parent - anchors.margins: Style.marginS * scaling + anchors { + leftMargin: Style.marginL * scaling + rightMargin: Style.marginL * scaling + } spacing: Style.marginS * scaling + // Color preview circle Rectangle { - Layout.preferredWidth: 24 * scaling - Layout.preferredHeight: 24 * scaling + Layout.preferredWidth: root.height * 0.6 * scaling + Layout.preferredHeight: root.height * 0.6 * scaling radius: Layout.preferredWidth * 0.5 color: root.selectedColor border.color: Color.mOutline @@ -56,11 +60,14 @@ Rectangle { text: root.selectedColor.toString().toUpperCase() font.family: Settings.data.ui.fontFixed Layout.fillWidth: true + Layout.alignment: Qt.AlignVCenter } NIcon { icon: "color-picker" color: Color.mOnSurfaceVariant + Layout.fillWidth: true + Layout.alignment: Qt.AlignVCenter } } }