Normalize picker padding (#54573)

Looks like this now:
<img width="608" height="152" alt="image"
src="https://github.com/user-attachments/assets/275c9574-e4fe-4855-b269-051b68b87bbe"
/>

Closes #53188

Release Notes:

- N/A or Added/Fixed/Improved ...
This commit is contained in:
Cameron Mcloughlin authored and GitHub committed 2026-04-23 10:15:33 +00:00
1 parent d87d817aa4
commit ef11c159ca
1 file changed
+12 -9
+12 -9
View File
@@ -838,7 +838,7 @@ impl<D: PickerDelegate> Picker<D> {
el.with_width_from_item(Some(widest_item))
})
.flex_grow()
.py_1()
.py(DynamicSpacing::Base04.rems(cx))
.track_scroll(&scroll_handle)
.into_any_element(),
ElementContainer::List(state) => list(
@@ -849,7 +849,7 @@ impl<D: PickerDelegate> Picker<D> {
)
.with_sizing_behavior(sizing_behavior)
.flex_grow()
.py_2()
.py(DynamicSpacing::Base04.rems(cx))
.into_any_element(),
}
}
@@ -1123,13 +1123,16 @@ impl<D: PickerDelegate> Render for Picker<D> {
.when(self.delegate.match_count() == 0, |el| {
el.when_some(self.delegate.no_matches_text(window, cx), |el, text| {
el.child(
v_flex().flex_grow().py_2().child(
ListItem::new("empty_state")
.inset(true)
.spacing(ListItemSpacing::Sparse)
.disabled(true)
.child(Label::new(text).color(Color::Muted)),
),
v_flex()
.flex_grow()
.py(DynamicSpacing::Base04.rems(cx))
.child(
ListItem::new("empty_state")
.inset(true)
.spacing(ListItemSpacing::Sparse)
.disabled(true)
.child(Label::new(text).color(Color::Muted)),
),
)
})
})