Use sparse spacing for ListItems in Pickers

This commit is contained in:
Marshall Bowers 2023-12-21 16:33:41 -05:00
parent dc09dbc98c
commit 71a222abcb
14 changed files with 110 additions and 61 deletions

View file

@ -5,7 +5,7 @@ use gpui::{
View, ViewContext, WindowContext,
};
use std::{cmp, sync::Arc};
use ui::{prelude::*, v_stack, Color, Divider, Label, ListItem};
use ui::{prelude::*, v_stack, Color, Divider, Label, ListItem, ListItemSpacing};
use workspace::ModalView;
pub struct Picker<D: PickerDelegate> {
@ -293,6 +293,7 @@ impl<D: PickerDelegate> Render for Picker<D> {
el.child(
ListItem::new("empty_state")
.inset(true)
.spacing(ListItemSpacing::Sparse)
.disabled(true)
.child(Label::new("No matches").color(Color::Muted)),
)