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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user