From 468272d4c9d40df48b85285979c9fc5bb9f35277 Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Mon, 1 Sep 2025 22:38:01 -0400 Subject: [PATCH] NColorPicker: added theme colors to the first row of the palette. --- Widgets/NColorPicker.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Widgets/NColorPicker.qml b/Widgets/NColorPicker.qml index 8a26f0c..8dd348e 100644 --- a/Widgets/NColorPicker.qml +++ b/Widgets/NColorPicker.qml @@ -21,6 +21,8 @@ Rectangle { border.color: Color.mOutline border.width: Math.max(1, Style.borderS * scaling) + property var presetColors: [Color.mPrimary, Color.mSecondary, Color.mTertiary, Color.mError, Color.mSurface, Color.mSurfaceVariant, Color.mOutline, "#FFFFFF", "#000000", "#F44336", "#E91E63", "#9C27B0", "#673AB7", "#3F51B5", "#2196F3", "#03A9F4", "#00BCD4", "#009688", "#4CAF50", "#8BC34A", "#CDDC39", "#FFEB3B", "#FFC107", "#FF9800", "#FF5722", "#795548", "#9E9E9E"] + Behavior on implicitWidth { NumberAnimation { duration: Style.animationFast @@ -96,10 +98,8 @@ Rectangle { spacing: Style.marginXS * scaling Layout.fillWidth: true - property var presetColors: ["#F44336", "#E91E63", "#9C27B0", "#673AB7", "#3F51B5", "#2196F3", "#03A9F4", "#00BCD4", "#009688", "#4CAF50", "#8BC34A", "#CDDC39", "#FFEB3B", "#FFC107", "#FF9800", "#FF5722", "#795548", "#9E9E9E", "#607D8B", "#000000", "#FFFFFF", "#F5F5F5", "#E0E0E0", "#9E9E9E"] - Repeater { - model: parent.presetColors + model: root.presetColors Rectangle { width: Math.round(29 * scaling)