From 4ef84f2a972d642abf7f643712d1093662d5d723 Mon Sep 17 00:00:00 2001 From: gramps Date: Fri, 30 Oct 2026 07:47:00 -0700 Subject: [PATCH] design: convert Themes/Controls.xaml to tokens (surface 1 of the sweep) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The theme file that every control inherits is now token-driven: 73 hardcoded colours became Brush.* references, and the two role changes the standard requires landed here first. - Red leaves the chrome. The seven #e94560 sites (base button, focus borders, checked box and segment backgrounds, the selected-layer accent strip) were all interactive/selection roles, so they are blue now. Red stays for live/record only. - The slider was green: its fill and gloss knob are blue now, with the track on SurfaceContainerLowest. The old green fill predated the standard. - The pill toggle was ON = green, OFF = red — a settings control using the live colour. It is now OFF = neutral surface, ON = blue. - Added scrim-soft/scrim-strong tokens (#22FFFFFF/#26FFFFFF) for the existing white washes, and Color.* resources for the two gradients (a GradientStop needs a Color, not a Brush). Guard: DesignTokensTests gains Converted_surfaces_carry_no_raw_colour — a declared list of converted files, so each sweep commit is guarded as it lands instead of waiting for one global grep at the end. Pure white/black highlights are the only allowed literals. No layout, spacing or behaviour change: this unit is colour only. --- DESIGN.md | 2 + Themes/Controls.xaml | 144 +++++++++++++----------------- Themes/Tokens.xaml | 7 ++ ytLive.Tests/DesignTokensTests.cs | 26 +++++- 4 files changed, 96 insertions(+), 83 deletions(-) diff --git a/DESIGN.md b/DESIGN.md index a51c4ed..9e55779 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -25,6 +25,8 @@ | `surface-bright` | `#31394d` | Lightest surface, rare use (strong hover) | | `outline` | `#334155` | Borders, dividers | | `outline-variant` | `#1e293b` | Subtle dividers, inactive meter segments | +| `scrim-soft` | `#22FFFFFF` | Hover/press wash over a surface (13% white) | +| `scrim-strong` | `#26FFFFFF` | Stronger wash — selected icon, dimmed image (15% white) | ### Text diff --git a/Themes/Controls.xaml b/Themes/Controls.xaml index 0ed5c54..3f63732 100644 --- a/Themes/Controls.xaml +++ b/Themes/Controls.xaml @@ -4,7 +4,7 @@ @@ -90,9 +90,9 @@ - - - - - - - - - - - - + - - - - - - - - - - + - +