From a2caeedcd97bd84e71627afdc7f00918b2a56e14 Mon Sep 17 00:00:00 2001 From: vangel76 Date: Sun, 25 Oct 2026 10:26:14 +0100 Subject: [PATCH] Quick Analysis: use theme category colours after the theme change on main Co-Authored-By: Claude Sonnet 5.5 --- crates/ui-egui/src/icons.rs | 2 +- crates/ui-egui/src/quick_analysis.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/icons.rs b/crates/ui-egui/src/icons.rs index bdfcbbb52..57ab9c0a7 100644 --- a/crates/ui-egui/src/icons.rs +++ b/crates/ui-egui/src/icons.rs @@ -754,7 +754,7 @@ fn paint_with(p: &Painter, rect: Rect, icon: Icon, c: Color32, pal: &Palette) { g.stroke(&[(2.0, 6.5), (14.0, 6.5)], light); g.stroke(&[(6.0, 3.0), (6.0, 13.0)], light); g.stroke(&[(10.0, 3.0), (10.0, 13.0)], light); - g.line(&[(10.0, 1.0), (6.5, 8.0), (9.5, 8.0), (6.5, 15.0)], BLUE, 1.7); + g.line(&[(10.0, 1.0), (6.5, 8.0), (9.5, 8.0), (6.5, 15.0)], blue, 1.7); } } } diff --git a/crates/ui-egui/src/quick_analysis.rs b/crates/ui-egui/src/quick_analysis.rs index 5fd3f8f6a..1035ccbd1 100644 --- a/crates/ui-egui/src/quick_analysis.rs +++ b/crates/ui-egui/src/quick_analysis.rs @@ -12,7 +12,7 @@ use serde_json::{Value as Json, json}; use crate::SheetApp; use crate::grid::{Drag, Geo}; use crate::icons::{self, Icon}; -use crate::theme::{self, Tokens}; +use crate::theme::{self, Cat, Tokens}; /// Side of the corner button, and its gap to the selection's corner (clear of the fill handle). const BUTTON: f32 = 22.0; @@ -290,7 +290,7 @@ fn paint_tile(ui: &mut Ui, t: &Tokens, item: &Tile, label: &str) -> bool { fn paint_glyph(ui: &Ui, t: &Tokens, glyph: Glyph, r: Rect) { let p = ui.painter(); - let (green, blue, red, yellow) = (icons::GREEN, icons::BLUE, icons::RED, icons::YELLOW); + let (green, blue, red, yellow) = (t.cat(Cat::Green), t.cat(Cat::Blue), t.cat(Cat::Red), t.cat(Cat::Amber)); let cell = |i: f32, j: f32| Rect::from_min_size(r.min + vec2(i * r.width() / 3.0, j * r.height() / 3.0), vec2(r.width() / 3.0, r.height() / 3.0)); match glyph { Glyph::Icon(icon) => icons::paint(p, r, icon, t.text),