Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
ui: Fix scrollbar showing despite being disabled by tracked setting (#38152)
Alvaro Parker0adc6ddaada7
diff --git a/crates/ui/src/components/scrollbar.rs b/crates/ui/src/components/scrollbar.rsindex 35dd52e3574..e4c2937be77 100644--- a/crates/ui/src/components/scrollbar.rs+++ b/crates/ui/src/components/scrollbar.rs@@ -521,6 +521,7 @@ impl<S: ScrollbarVisibility, T: ScrollableHandle> ScrollbarState<S, T> {cx.observe_global_in::<SettingsStore>(window, Self::settings_changed).detach();+ let show_setting = S::get_value(cx).visibility(cx);ScrollbarState {thumb_state: Default::default(),notify_id: config.tracked_entity.map(|id| id.unwrap_or(parent_id)),@@ -529,8 +530,8 @@ impl<S: ScrollbarVisibility, T: ScrollableHandle> ScrollbarState<S, T> {width: config.scrollbar_width,visibility: config.visibility,tracked_setting: PhantomData,- show_setting: S::get_value(cx).visibility(cx),- show_state: VisibilityState::Visible,+ show_setting,+ show_state: VisibilityState::from_show_setting(show_setting),mouse_in_parent: true,last_prepaint_state: None,_auto_hide_task: None,