From d1b3e2985911b8ea6c9467b56d9feb2ac5e8ea32 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Sun, 27 Sep 2026 14:40:11 +0200 Subject: [PATCH] refactor(settings): drop the raised-control paint nothing uses now Tk::btn and Tk::raised_hover lost their last callers when the page's controls moved onto the well. Also corrects two comments that described the old field ring and claimed more than was observed. --- src/ui/prompt.rs | 5 +++-- src/ui/settings/kit.rs | 17 +---------------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/src/ui/prompt.rs b/src/ui/prompt.rs index 1612a976..505bac36 100644 --- a/src/ui/prompt.rs +++ b/src/ui/prompt.rs @@ -209,8 +209,9 @@ impl Render for TextPrompt { .track_focus(&self.focus) .size_full() // Nothing under the scrim answers the pointer while the question - // is up: the prompt is painted over the window, not into it, so - // without this a click on the dimmed tab strip still switched tabs. + // is up: the prompt is painted over the window, not into it, and + // gpui hands a click to every hitbox under it that is not + // occluded — the dimmed window would still take it. .occlude() .cursor_default() .bg(crate::ui::presets::scrim_fill(cx)) diff --git a/src/ui/settings/kit.rs b/src/ui/settings/kit.rs index 355531fc..26dfcf64 100644 --- a/src/ui/settings/kit.rs +++ b/src/ui/settings/kit.rs @@ -47,8 +47,6 @@ pub(crate) struct Tk { pub heading: Hsla, /// A nav item at rest. pub nav: Hsla, - /// A raised button's fill. - pub btn: Hsla, /// The one fill every control on the page stands on — field, dropdown, /// secondary button, stepper — the theme's `muted`, the same well the /// dialogs' fields and the sidebar's search sit in. No outline, no drop. @@ -104,7 +102,6 @@ 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 }, well, well_hover: well.blend(fg.opacity(if dark { 0.06 } else { 0.05 })), focus: theme.ring, @@ -130,18 +127,6 @@ impl Tk { } } - /// The same, a step firmer, for a hovered raised control. - pub(crate) fn raised_hover(&self) -> Vec { - if self.dark { - vec![ring(self.fg.opacity(0.2), 0.5, false)] - } else { - vec![ - ring(gpui::black().opacity(0.16), 0.5, false), - drop(gpui::black().opacity(0.08), 1., 2., 0.), - ] - } - } - pub(crate) fn popover(&self) -> Vec { if self.dark { vec![ @@ -442,7 +427,7 @@ pub(crate) fn search_glass(size: f32, tk: &Tk) -> Icon { /// lower, at 26. pub(crate) const CONTROL_H: f32 = 28.; -/// A search field with a hairline ring, for filtering a list on the page. +/// A search field on the well, for filtering a list on the page. pub(crate) fn search_field(input: &gpui::Entity, tk: &Tk) -> Div { h_flex() .h(px(CONTROL_H))