diff --git a/src/ui/scrollbar.rs b/src/ui/scrollbar.rs index 89e1b75f..26a74e48 100644 --- a/src/ui/scrollbar.rs +++ b/src/ui/scrollbar.rs @@ -33,10 +33,9 @@ pub(crate) fn with_vertical_scrollbar( .right_0() .bottom_0() // No `scrollbar_show` override: it falls back to - // `cx.theme().scrollbar_show`, which `apply_theme` derives from - // `should_auto_hide_scrollbars()` — the OS "show scroll bars" - // preference. Pinning it here would take that choice away from - // everyone who asked for always-visible bars. + // `cx.theme().scrollbar_show`, which `apply_theme` pins to + // `Scrolling` for every list in the app. Overriding it here + // would be one list disagreeing with the rest. .child(Scrollbar::vertical(handle).id(id)), ) .into_any_element() diff --git a/src/ui/theme.rs b/src/ui/theme.rs index fb71d0fa..a30ce26e 100644 --- a/src/ui/theme.rs +++ b/src/ui/theme.rs @@ -578,7 +578,6 @@ pub(crate) fn apply_theme(mut window: Option<&mut Window>, cx: &mut App) { let surfaces = theme.surfaces(); let sem = theme.semantics(); let active = theme.active_palette(config.theme_legible_palette); - let auto_hide_scrollbars = cx.should_auto_hide_scrollbars(); let backdrop = config.window_backdrop; @@ -769,11 +768,14 @@ pub(crate) fn apply_theme(mut window: Option<&mut Window>, cx: &mut App) { t.tokens.scrollbar_thumb = scrollbar_thumb.into(); t.tokens.scrollbar_thumb_hover = scrollbar_thumb_hover.into(); - t.scrollbar_show = if auto_hide_scrollbars { - ScrollbarShow::Scrolling - } else { - ScrollbarShow::Always - }; + // Not `should_auto_hide_scrollbars()`. That preference answers a question + // about *legacy* scrollbars — the ones that take a gutter out of the layout + // — and macOS says "don't hide them" for anyone with a mouse plugged in. + // Ours are overlay bars painted on top of the content, so honouring it + // parked an opaque bar over the switcher's tab column for the whole time + // the panel was open, with nothing to fade it out. Every list in the app + // gets the same bar, so it fades everywhere or nowhere. + t.scrollbar_show = ScrollbarShow::Scrolling; t.radius = px(8.);