From 8ee04bf04a9b4b501801db7a68ac6bab2c7a93a3 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Fri, 20 Dec 2024 19:02:12 -0300 Subject: [PATCH] Fix remote dev project name label (#22307) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes https://github.com/zed-industries/zed/issues/21877 Screenshot 2024-12-20 at 6 45 50 PM Release Notes: - N/A --- crates/title_bar/src/title_bar.rs | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/crates/title_bar/src/title_bar.rs b/crates/title_bar/src/title_bar.rs index 799d76cef3..55834d982f 100644 --- a/crates/title_bar/src/title_bar.rs +++ b/crates/title_bar/src/title_bar.rs @@ -318,21 +318,24 @@ impl TitleBar { Some( ButtonLike::new("ssh-server-icon") .child( - IconWithIndicator::new( - Icon::new(IconName::Server) - .size(IconSize::XSmall) - .color(icon_color), - Some(Indicator::dot().color(indicator_color)), - ) - .indicator_border_color(Some(cx.theme().colors().title_bar_background)) - .into_any_element(), - ) - .child( - div() + h_flex() + .gap_2() .max_w_32() - .overflow_hidden() - .text_ellipsis() - .child(Label::new(nickname.clone()).size(LabelSize::Small)), + .child( + IconWithIndicator::new( + Icon::new(IconName::Server) + .size(IconSize::XSmall) + .color(icon_color), + Some(Indicator::dot().color(indicator_color)), + ) + .indicator_border_color(Some(cx.theme().colors().title_bar_background)) + .into_any_element(), + ) + .child( + Label::new(nickname.clone()) + .size(LabelSize::Small) + .text_ellipsis(), + ), ) .tooltip(move |cx| { Tooltip::with_meta("Remote Project", Some(&OpenRemote), meta.clone(), cx)