diff --git a/crates/ui/src/components/scrollbar.rs b/crates/ui/src/components/scrollbar.rs index 50b8800fdaf471982a50adfc60cf793bf4c728b6..d8dd1d998f84407d106838b4e30bf0bcb91b97dd 100644 --- a/crates/ui/src/components/scrollbar.rs +++ b/crates/ui/src/components/scrollbar.rs @@ -1194,9 +1194,13 @@ impl Element for ScrollbarElement { let scroll_track_bounds = Bounds::from_corner_and_size( track_anchor, self.origin + bounds.corner(track_anchor), - bounds - .size - .apply_along(axis.invert(), |_| width + 2 * SCROLLBAR_PADDING), + bounds.size.apply_along(axis.invert(), |_| { + width + + match state.style { + ScrollbarStyle::Rounded => 2 * SCROLLBAR_PADDING, + ScrollbarStyle::Editor => SCROLLBAR_PADDING, + } + }), ); // Rounded style needs a bit of padding, whereas for editor scrolbars,