assistant2: Adjust spacing and icons on the context picker (#23607)

Just fine-tuning spacing, icon size and color, and ensure they're are
consistent throughout.

Release Notes:

- N/A
This commit is contained in:
Danilo Leal 2025-01-24 12:34:11 -03:00 committed by GitHub
parent 8efed4c449
commit fc3a871264
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 45 additions and 22 deletions

View file

@ -234,7 +234,12 @@ impl PickerDelegate for DirectoryContextPickerDelegate {
ListItem::new(ix)
.inset(true)
.toggle_state(selected)
.child(h_flex().gap_2().child(Label::new(directory_name)))
.start_slot(
Icon::new(IconName::Folder)
.size(IconSize::XSmall)
.color(Color::Muted),
)
.child(Label::new(directory_name))
.when(added, |el| {
el.end_slot(
h_flex()

View file

@ -396,12 +396,12 @@ pub fn render_file_context_entry(
h_flex()
.id(id)
.gap_1()
.gap_1p5()
.w_full()
.child(file_icon.size(IconSize::Small))
.child(file_icon.size(IconSize::Small).color(Color::Muted))
.child(
h_flex()
.gap_2()
.gap_1()
.child(Label::new(file_name))
.children(directory.map(|directory| {
Label::new(directory)
@ -409,11 +409,12 @@ pub fn render_file_context_entry(
.color(Color::Muted)
})),
)
.child(div().w_full())
.when_some(added, |el, added| match added {
FileInclusion::Direct(_) => el.child(
h_flex()
.gap_1()
.w_full()
.justify_end()
.gap_0p5()
.child(
Icon::new(IconName::Check)
.size(IconSize::Small)
@ -426,7 +427,9 @@ pub fn render_file_context_entry(
el.child(
h_flex()
.gap_1()
.w_full()
.justify_end()
.gap_0p5()
.child(
Icon::new(IconName::Check)
.size(IconSize::Small)

View file

@ -209,9 +209,13 @@ pub fn render_thread_context_entry(
});
h_flex()
.gap_1()
.gap_1p5()
.w_full()
.child(Icon::new(IconName::MessageCircle).size(IconSize::Small))
.child(
Icon::new(IconName::MessageCircle)
.size(IconSize::XSmall)
.color(Color::Muted),
)
.child(Label::new(thread.summary.clone()))
.child(div().w_full())
.when(added, |el| {