From d9955df56bc3d088e2238fb7d5e5a713ff94eca2 Mon Sep 17 00:00:00 2001 From: Adam Hitchcock Date: Thu, 8 Oct 2026 19:49:43 -0700 Subject: [PATCH] fix(settings): light-theme controls take the page's hue instead of white (#1137) On a light theme Settings drew its dropdowns, buttons, menus, chips and switch knobs pure white, which stands out on a tinted page such as a cream theme. They are now the page colour lifted a step and made opaque, so they keep the theme's hue; a white theme still gets white controls, and dark themes are unchanged. The change is the `raised` colour in `settings/kit.rs`. `cargo test --bin tty7-app settings` gives 58 passed. Co-authored-by: Claude Opus 5.5 --- src/ui/settings/kit.rs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/ui/settings/kit.rs b/src/ui/settings/kit.rs index 57fe525d..db5cad87 100644 --- a/src/ui/settings/kit.rs +++ b/src/ui/settings/kit.rs @@ -75,7 +75,13 @@ impl Tk { let fg = theme.foreground; let page = theme.background; let a = |light: f32, dark_a: f32| fg.opacity(if dark { dark_a } else { light }); - let white = gpui::white(); + // Light controls sit a step above the page in the theme's own hue, so + // a cream theme gets cream fields and a white one stays white. Opaque: + // the page carries the window's opacity, a control should not. + let raised = Hsla { + a: 1., + ..lift(page, 0.035) + }; Self { dark, fg, @@ -94,10 +100,10 @@ impl Tk { k6: a(0.6, 0.65), heading: a(0.9, 0.9), nav: a(0.82, 0.8), - btn: if dark { fg.opacity(0.1) } else { white }, - menu: if dark { lift(page, 0.06) } else { white }, - knob: if dark { fg } else { white }, - chip: if dark { fg.opacity(0.16) } else { white }, + btn: if dark { fg.opacity(0.1) } else { raised }, + menu: if dark { lift(page, 0.06) } else { raised }, + knob: if dark { fg } else { raised }, + chip: if dark { fg.opacity(0.16) } else { raised }, warn: gpui::rgb(0xe0a100).into(), warn_text: gpui::rgb(0xb07d00).into(), danger: gpui::rgb(0xd93025).into(),