From d53efe4e9177ce08a55702967fd00555a4ac4724 Mon Sep 17 00:00:00 2001 From: Finn Evers Date: Wed, 22 Oct 2025 15:35:25 +0200 Subject: [PATCH] Revert "gpui: Fix uniform list scrolling with vertical padding present" (#40891) Reverts zed-industries/zed#40719 This unveiled some bigger issues with the UniformList size computations, which are more crucial than what was fixed here. Release Notes: - NOTE: BUGFIX "Fixed a rare issue where the extension page would stutter while scrolling." was reverted due to some other issues --- crates/gpui/src/elements/uniform_list.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/crates/gpui/src/elements/uniform_list.rs b/crates/gpui/src/elements/uniform_list.rs index 3b721d4238..949d4339e6 100644 --- a/crates/gpui/src/elements/uniform_list.rs +++ b/crates/gpui/src/elements/uniform_list.rs @@ -364,7 +364,17 @@ impl Element for UniformList { content_size, window, cx, - |_style, mut scroll_offset, hitbox, window, cx| { + |style, mut scroll_offset, hitbox, window, cx| { + let border = style.border_widths.to_pixels(window.rem_size()); + let padding = style + .padding + .to_pixels(bounds.size.into(), window.rem_size()); + + let padded_bounds = Bounds::from_corners( + bounds.origin + point(border.left + padding.left, border.top), + bounds.bottom_right() - point(border.right + padding.right, border.bottom), + ); + let y_flipped = if let Some(scroll_handle) = &self.scroll_handle { let scroll_state = scroll_handle.0.borrow(); scroll_state.y_flipped