Use padded bounds to draw uniform list items

This commit is contained in:
Antonio Scandurra 2023-11-10 15:17:17 +01:00
parent 1d37191320
commit c76fd93015

View file

@ -211,7 +211,7 @@ impl<V: 'static> Element<V> for UniformList<V> {
let item_origin =
padded_bounds.origin + point(px(0.), item_height * ix + scroll_offset);
let available_space = size(
AvailableSpace::Definite(bounds.size.width),
AvailableSpace::Definite(padded_bounds.size.width),
AvailableSpace::Definite(item_height),
);
item.draw(item_origin, available_space, view_state, cx);