Fix remote dev project name label (#22307)
Danilo Leal
created
Closes https://github.com/zed-industries/zed/issues/21877
<img width="800" alt="Screenshot 2024-12-20 at 6 45 50 PM"
src="https://github.com/user-attachments/assets/2069465f-1a00-47de-b691-585bb2603279"
/>
Release Notes:
- N/A
Change summary
crates/title_bar/src/title_bar.rs | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
Detailed changes
@@ -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)