diff --git a/crates/ui/src/scroll/scrollbar.rs b/crates/ui/src/scroll/scrollbar.rs index fb2b6954..e234dfd5 100644 --- a/crates/ui/src/scroll/scrollbar.rs +++ b/crates/ui/src/scroll/scrollbar.rs @@ -579,6 +579,7 @@ impl Element for Scrollbar { let state = self.state.clone(); let is_always_to_show = cx.theme().scrollbar_show.is_always(); + let is_hover_to_show = cx.theme().scrollbar_show.is_hover(); let is_hovered_on_bar = state.get().hovered_axis == Some(axis); let is_hovered_on_thumb = state.get().hovered_on_thumb == Some(axis); let is_offset_changed = state.get().last_scroll_offset != self.scroll_handle.offset(); @@ -586,7 +587,7 @@ impl Element for Scrollbar { let (thumb_bg, bar_bg, bar_border, thumb_width, inset, radius) = if state.get().dragged_axis == Some(axis) { Self::style_for_active(cx) - } else if is_hovered_on_bar || is_hovered_on_thumb { + } else if is_hover_to_show && (is_hovered_on_bar || is_hovered_on_thumb) { if is_hovered_on_thumb { Self::style_for_hovered_thumb(cx) } else {