From c06a0c5d78a2f0c0bac46a22aad289a856a34b4f Mon Sep 17 00:00:00 2001 From: Jens Krause <47693+sectore@users.noreply.github.com> Date: Wed, 5 Mar 2025 03:14:22 +0100 Subject: [PATCH] scrollbar: Fix Scrollbar not clickable when it is always showing. (#686) On `platform` level, [should_auto_hide_scrollbars()](https://github.com/zed-industries/zed/blob/76a81607deec5b9093237cd3e98506dccc9f9565/crates/gpui/src/platform.rs#L205) might be `false` for some `platform`s, e.g. for `Linux`. That's why another check is needed to make scrollbars work properly on Linux. Fixes #685 --------- Co-authored-by: Jason Lee --- crates/ui/src/scroll/scrollbar.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ui/src/scroll/scrollbar.rs b/crates/ui/src/scroll/scrollbar.rs index 75087246..b2d58c28 100644 --- a/crates/ui/src/scroll/scrollbar.rs +++ b/crates/ui/src/scroll/scrollbar.rs @@ -632,7 +632,7 @@ impl Element for Scrollbar { cx: &mut App, ) { let hitbox_bounds = prepaint.hitbox.bounds; - let is_visible = self.state.get().is_scrollbar_visible(); + let is_visible = self.state.get().is_scrollbar_visible() || cx.theme().scrollbar_show.is_always(); let is_hover_to_show = cx.theme().scrollbar_show.is_hover(); // Update last_scroll_time when offset is changed.