From 6af9e8ded8d8fda917ba0df0107ece73696f8a01 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Tue, 7 Jan 2025 13:04:54 -0300 Subject: [PATCH] assistant2: Fix toolbar layout shift (#22770) Note how, previously, switching between the thread view and the history caused a slightly reduction of the toolbar height. Super subtle stuff, but doesn't happen anymore. ### Before https://github.com/user-attachments/assets/712ff34e-a638-484d-8415-16011b10ae63 ### After https://github.com/user-attachments/assets/7ccff7a3-45a4-445c-9638-8445733e0ffc Release Notes: - N/A --- crates/assistant2/src/assistant_panel.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/assistant2/src/assistant_panel.rs b/crates/assistant2/src/assistant_panel.rs index 4c7a1f97e7abd7426b7bc43d54c8eead734d4307..64135bfce718014dc44b697768dd9930f1103149 100644 --- a/crates/assistant2/src/assistant_panel.rs +++ b/crates/assistant2/src/assistant_panel.rs @@ -311,10 +311,11 @@ impl AssistantPanel { h_flex() .id("assistant-toolbar") + .px(DynamicSpacing::Base08.rems(cx)) + .h(Tab::container_height(cx)) + .flex_none() .justify_between() .gap(DynamicSpacing::Base08.rems(cx)) - .h(Tab::container_height(cx)) - .px(DynamicSpacing::Base08.rems(cx)) .bg(cx.theme().colors().tab_bar_background) .border_b_1() .border_color(cx.theme().colors().border) @@ -322,7 +323,7 @@ impl AssistantPanel { .child( h_flex() .h_full() - .pl_1() + .pl_1p5() .border_l_1() .border_color(cx.theme().colors().border) .gap(DynamicSpacing::Base02.rems(cx))