From 84246e0d5d82b89880269d4085042785aeb55f2b Mon Sep 17 00:00:00 2001 From: Corey Woodworth Date: Wed, 26 Nov 2025 21:20:12 -0500 Subject: [PATCH] Added small margin, put theme colors on top --- Widgets/NColorPickerDialog.qml | 78 +++++++++++++++++----------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/Widgets/NColorPickerDialog.qml b/Widgets/NColorPickerDialog.qml index 1324f5b1..9ba5ae93 100644 --- a/Widgets/NColorPickerDialog.qml +++ b/Widgets/NColorPickerDialog.qml @@ -620,43 +620,6 @@ Popup { columnSpacing: 6 rowSpacing: 6 - Repeater { - model: ColorList.colors - - Rectangle { - width: 24 - height: 24 - radius: Style.radiusXXS - color: modelData.color - border.color: root.selectedColor.toString() === modelData.color.toString() ? Color.mPrimary : Color.mOutline - border.width: Math.max(1, root.selectedColor.toString() === modelData.color.toString() ? Style.borderM : Style.borderS) - - MouseArea { - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - hoverEnabled: true - - onEntered: { - TooltipService.show(parent, modelData.name + "\n" + parent.color.toString().toUpperCase()); - } - onExited: { - TooltipService.hide(); - } - onClicked: { - root.selectedColor = modelData.color; - TooltipService.hide(); - } - } - } - } - - NDivider { - Layout.columnSpan: 15 - Layout.fillWidth: true - Layout.topMargin: Style.marginXS - Layout.bottomMargin: 0 - } - NLabel { Layout.columnSpan: 15 Layout.fillWidth: true @@ -695,6 +658,43 @@ Popup { } ] + Rectangle { + width: 24 + height: 24 + radius: Style.radiusXXS + color: modelData.color + border.color: root.selectedColor.toString() === modelData.color.toString() ? Color.mPrimary : Color.mOutline + border.width: Math.max(1, root.selectedColor.toString() === modelData.color.toString() ? Style.borderM : Style.borderS) + + MouseArea { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + hoverEnabled: true + + onEntered: { + TooltipService.show(parent, modelData.name + "\n" + parent.color.toString().toUpperCase()); + } + onExited: { + TooltipService.hide(); + } + onClicked: { + root.selectedColor = modelData.color; + TooltipService.hide(); + } + } + } + } + + NDivider { + Layout.columnSpan: 15 + Layout.fillWidth: true + Layout.topMargin: Style.marginXS + Layout.bottomMargin: 0 + } + + Repeater { + model: ColorList.colors + Rectangle { width: 24 height: 24 @@ -728,8 +728,8 @@ Popup { RowLayout { Layout.fillWidth: true - //Layout.topMargin: 20 - //Layout.bottomMargin: 20 + Layout.topMargin: 1 + Layout.bottomMargin: 1 spacing: 10 Item {