agent: Refine toolbar spacing (#28373)

Release Notes:

- N/A
This commit is contained in:
Danilo Leal 2025-04-08 20:28:25 -03:00 committed by GitHub
parent ac958d4a2d
commit 64cea2f1f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -855,9 +855,11 @@ impl AssistantPanel {
if is_empty { if is_empty {
Label::new(Thread::DEFAULT_SUMMARY.clone()) Label::new(Thread::DEFAULT_SUMMARY.clone())
.truncate() .truncate()
.ml_2()
.into_any_element() .into_any_element()
} else if summary.is_none() { } else if summary.is_none() {
Label::new(LOADING_SUMMARY_PLACEHOLDER) Label::new(LOADING_SUMMARY_PLACEHOLDER)
.ml_2()
.truncate() .truncate()
.into_any_element() .into_any_element()
} else { } else {
@ -873,7 +875,7 @@ impl AssistantPanel {
}) })
.unwrap_or_else(|| SharedString::from(LOADING_SUMMARY_PLACEHOLDER)); .unwrap_or_else(|| SharedString::from(LOADING_SUMMARY_PLACEHOLDER));
Label::new(title).truncate().into_any_element() Label::new(title).ml_2().truncate().into_any_element()
} }
ActiveView::History => Label::new("History").truncate().into_any_element(), ActiveView::History => Label::new("History").truncate().into_any_element(),
ActiveView::Configuration => Label::new("Settings").truncate().into_any_element(), ActiveView::Configuration => Label::new("Settings").truncate().into_any_element(),
@ -910,23 +912,25 @@ impl AssistantPanel {
let go_back_button = match &self.active_view { let go_back_button = match &self.active_view {
ActiveView::History | ActiveView::Configuration => Some( ActiveView::History | ActiveView::Configuration => Some(
IconButton::new("go-back", IconName::ArrowLeft) div().pl_1().child(
.icon_size(IconSize::Small) IconButton::new("go-back", IconName::ArrowLeft)
.on_click(cx.listener(|this, _, window, cx| { .icon_size(IconSize::Small)
this.go_back(&workspace::GoBack, window, cx); .on_click(cx.listener(|this, _, window, cx| {
})) this.go_back(&workspace::GoBack, window, cx);
.tooltip({ }))
let focus_handle = focus_handle.clone(); .tooltip({
move |window, cx| { let focus_handle = focus_handle.clone();
Tooltip::for_action_in( move |window, cx| {
"Go Back", Tooltip::for_action_in(
&workspace::GoBack, "Go Back",
&focus_handle, &workspace::GoBack,
window, &focus_handle,
cx, window,
) cx,
} )
}), }
}),
),
), ),
_ => None, _ => None,
}; };
@ -944,8 +948,7 @@ impl AssistantPanel {
.child( .child(
h_flex() h_flex()
.w_full() .w_full()
.pl_2() .gap_1()
.gap_2()
.children(go_back_button) .children(go_back_button)
.child(self.render_title_view(window, cx)), .child(self.render_title_view(window, cx)),
) )