gpui: Fix uniform list scrolling with vertical padding present (#40719)

Closes #40267

Release Notes:

- Fixed a rare issue where the extension page would stutter while
scrolling.
This commit is contained in:
Finn Evers
2025-10-20 18:57:00 +00:00
committed by GitHub
parent 79ada634ac
commit 853d7c3f92
+1 -11
View File
@@ -364,17 +364,7 @@ impl Element for UniformList {
content_size,
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),
);
|_style, mut scroll_offset, hitbox, window, cx| {
let y_flipped = if let Some(scroll_handle) = &self.scroll_handle {
let scroll_state = scroll_handle.0.borrow();
scroll_state.y_flipped