Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

git_ui: Tweak appearance of repo and branch separator (#38447)

Bartosz Kaszubowski0f6631019204
diff --git a/crates/git_ui/src/git_panel.rs b/crates/git_ui/src/git_panel.rs
index e66da365764..6ab2b24e2ab 100644
--- a/crates/git_ui/src/git_panel.rs
+++ b/crates/git_ui/src/git_panel.rs
@@ -4550,7 +4550,6 @@ impl RenderOnce for PanelRepoFooter {
};
let repo_selector_trigger = Button::new("repo-selector", truncated_repo_name)
- .style(ButtonStyle::Transparent)
.size(ButtonSize::None)
.label_size(LabelSize::Small)
.color(Color::Muted);
@@ -4571,7 +4570,6 @@ impl RenderOnce for PanelRepoFooter {
.into_any_element();
let branch_selector_button = Button::new("branch-selector", truncated_branch_name)
- .style(ButtonStyle::Transparent)
.size(ButtonSize::None)
.label_size(LabelSize::Small)
.truncate(true)
@@ -4592,34 +4590,31 @@ impl RenderOnce for PanelRepoFooter {
});
h_flex()
+ .h(px(36.))
.w_full()
.px_2()
- .h(px(36.))
- .items_center()
.justify_between()
.gap_1()
.child(
h_flex()
.flex_1()
.overflow_hidden()
- .items_center()
+ .gap_px()
.child(
- div().child(
- Icon::new(IconName::GitBranchAlt)
- .size(IconSize::Small)
- .color(if single_repo {
- Color::Disabled
- } else {
- Color::Muted
- }),
- ),
+ Icon::new(IconName::GitBranchAlt)
+ .size(IconSize::Small)
+ .color(if single_repo {
+ Color::Disabled
+ } else {
+ Color::Muted
+ }),
)
.child(repo_selector)
.when(show_separator, |this| {
this.child(
div()
- .text_color(cx.theme().colors().text_muted)
.text_sm()
+ .text_color(cx.theme().colors().icon_muted.opacity(0.5))
.child("/"),
)
})
diff --git a/crates/ui/src/components/button/button_like.rs b/crates/ui/src/components/button/button_like.rs
index d38b919bffe..fec5da57f3d 100644
--- a/crates/ui/src/components/button/button_like.rs
+++ b/crates/ui/src/components/button/button_like.rs
@@ -596,7 +596,7 @@ impl RenderOnce for ButtonLike {
ButtonSize::Default | ButtonSize::Compact => {
this.px(DynamicSpacing::Base04.rems(cx))
}
- ButtonSize::None => this,
+ ButtonSize::None => this.px_px(),
})
.border_color(style.enabled(self.layer, cx).border_color)
.bg(style.enabled(self.layer, cx).background)