From 7cfc196bf64429e05c5346f24459f0f29424ea6b Mon Sep 17 00:00:00 2001 From: scheinriese Date: Mon, 23 Mar 2026 13:10:00 +0100 Subject: [PATCH] fix: inherit tab-bar selected color into text-picker on mount Pass the icon-search *color atom value as :selected-color to text-picker, so the text-picker's color initializes from the tab-bar selection when no existing icon color is saved. Co-Authored-By: Claude Opus 4.6 --- src/main/frontend/components/icon.cljs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/frontend/components/icon.cljs b/src/main/frontend/components/icon.cljs index 21edb0c524..886f401570 100644 --- a/src/main/frontend/components/icon.cljs +++ b/src/main/frontend/components/icon.cljs @@ -3047,10 +3047,11 @@ existing-value (get-in current-icon [:data :value]) existing-alignment (get-in current-icon [:data :alignment]) existing-color (get-in current-icon [:data :color]) + selected-color (:selected-color opts) existing-mode (get-in current-icon [:data :mode])] (reset! (::text-value s) (or existing-value (derive-initials title))) (reset! (::alignment s) (or existing-alignment "center")) - (reset! (::color s) existing-color) + (reset! (::color s) (or existing-color selected-color)) (reset! (::mode s) (or existing-mode "initials")) s)) :will-unmount (fn [s] @@ -3324,6 +3325,7 @@ :on-delete #(on-chosen nil) :del-btn? del-btn? :current-icon normalized-icon-value + :selected-color @*color :page-title page-title}) ;; Default - Level 1: Icon Picker view