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,6 +912,7 @@ 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(
div().pl_1().child(
IconButton::new("go-back", IconName::ArrowLeft) IconButton::new("go-back", IconName::ArrowLeft)
.icon_size(IconSize::Small) .icon_size(IconSize::Small)
.on_click(cx.listener(|this, _, window, cx| { .on_click(cx.listener(|this, _, window, cx| {
@ -928,6 +931,7 @@ impl AssistantPanel {
} }
}), }),
), ),
),
_ => 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)),
) )