diff --git a/crates/ui/src/virtual_list.rs b/crates/ui/src/virtual_list.rs index e1f7b356..66170fe6 100644 --- a/crates/ui/src/virtual_list.rs +++ b/crates/ui/src/virtual_list.rs @@ -18,11 +18,11 @@ use std::{ }; use gpui::{ - div, point, prelude::FluentBuilder as _, px, size, Along, AnyElement, App, AvailableSpace, - Axis, Bounds, ContentMask, Context, DeferredScrollToItem, Div, Element, ElementId, Entity, - GlobalElementId, Half, Hitbox, InteractiveElement, IntoElement, IsZero as _, - ListSizingBehavior, Pixels, Point, Render, ScrollHandle, ScrollStrategy, Size, Stateful, - StatefulInteractiveElement, StyleRefinement, Styled, Window, + div, point, px, size, Along, AnyElement, App, AvailableSpace, Axis, Bounds, ContentMask, + Context, DeferredScrollToItem, Div, Element, ElementId, Entity, GlobalElementId, Half, Hitbox, + InteractiveElement, IntoElement, IsZero as _, ListSizingBehavior, Pixels, Point, Render, + ScrollHandle, ScrollStrategy, Size, Stateful, StatefulInteractiveElement, StyleRefinement, + Styled, Window, }; use smallvec::SmallVec; @@ -181,10 +181,7 @@ where base: div() .id(id) .size_full() - .map(|this| match axis { - Axis::Horizontal => this.overflow_x_scroll().overflow_y_hidden(), - Axis::Vertical => this.overflow_y_scroll().overflow_x_hidden(), - }) + .overflow_scroll() .track_scroll(&scroll_handle), scroll_handle, items_count: item_sizes.len(),