From efabc8ee3fa7c706ddf1fef80350a7696cc9dae2 Mon Sep 17 00:00:00 2001 From: scheinriese Date: Thu, 21 May 2026 22:35:34 +0200 Subject: [PATCH] fix(text-picker): apply user-picked color to gallery previews MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The text-picker gallery (Initials / Abbreviated / Custom) called the `icon` fn without `:color? true`, so the SVG text rendered with default theme foreground instead of the user's chosen color — visible mismatch where the page-icon next to the page title showed the new color, but the preview tiles in the picker stayed white/themed. Same fix as the Custom-tab Text tile (commit 63c7236f74). The icon fn only wraps its output in `.ls-icon-color-wrap` when `:color? true`, and the wrapper's `style: color: ...` is what makes the SVG's `fill: currentColor` resolve to the chosen color. Co-Authored-By: Claude Opus 4.7 --- src/main/frontend/components/icon.cljs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/frontend/components/icon.cljs b/src/main/frontend/components/icon.cljs index 2ecb62d908..6aa0a22525 100644 --- a/src/main/frontend/components/icon.cljs +++ b/src/main/frontend/components/icon.cljs @@ -6544,7 +6544,11 @@ (persist!))} [:div.text-picker-gallery-preview (if display-text - (icon (build-icon display-text) {:size 36}) + ;; `:color? true` wraps the SVG in `.ls-icon-color-wrap` + ;; so the gallery preview's text picks up the user's + ;; chosen color via `currentColor` (same fix as the + ;; Custom-tab Text tile in custom-tab-cp). + (icon (build-icon display-text) {:size 36 :color? true}) (shui/tabler-icon "pencil" {:size 20}))] [:span.text-picker-gallery-label label]]))]