Skip to content

Commit 0f66310

Browse files
Simekdanilo-leal
andauthored
git_ui: Tweak appearance of repo and branch separator (#38447)
# Why In Git Panel, it felt to me that repo and branch separator can be slightly demphasized (since it is not-interactable) and separated a bit more from the repo and branch popover triggers. # How Use `icon_muted` color for the separator (happy to know if this is an abuse of the UI styleguide 😄), add one pixel horizontal spacing around the `/` character. Release Notes: - Improved appearance of repo and branch separator in Git Commit Panel # Test plan I have tested the change locally and compared the UI before and after to make sure it feels right. ### Before <img width="466" height="196" alt="Screenshot 2025-09-18 at 20 25 46" src="https://github.com/user-attachments/assets/7bfcd1a4-8d16-4e75-8660-9cbfa3952848" /> ### After <img width="466" height="196" alt="Screenshot 2025-09-18 at 20 25 12" src="https://github.com/user-attachments/assets/100d3599-ecc6-473f-b270-a71005b41494" /> --------- Co-authored-by: Danilo Leal <[email protected]>
1 parent 26adc70 commit 0f66310

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

crates/git_ui/src/git_panel.rs

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4550,7 +4550,6 @@ impl RenderOnce for PanelRepoFooter {
45504550
};
45514551

45524552
let repo_selector_trigger = Button::new("repo-selector", truncated_repo_name)
4553-
.style(ButtonStyle::Transparent)
45544553
.size(ButtonSize::None)
45554554
.label_size(LabelSize::Small)
45564555
.color(Color::Muted);
@@ -4571,7 +4570,6 @@ impl RenderOnce for PanelRepoFooter {
45714570
.into_any_element();
45724571

45734572
let branch_selector_button = Button::new("branch-selector", truncated_branch_name)
4574-
.style(ButtonStyle::Transparent)
45754573
.size(ButtonSize::None)
45764574
.label_size(LabelSize::Small)
45774575
.truncate(true)
@@ -4592,34 +4590,31 @@ impl RenderOnce for PanelRepoFooter {
45924590
});
45934591

45944592
h_flex()
4593+
.h(px(36.))
45954594
.w_full()
45964595
.px_2()
4597-
.h(px(36.))
4598-
.items_center()
45994596
.justify_between()
46004597
.gap_1()
46014598
.child(
46024599
h_flex()
46034600
.flex_1()
46044601
.overflow_hidden()
4605-
.items_center()
4602+
.gap_px()
46064603
.child(
4607-
div().child(
4608-
Icon::new(IconName::GitBranchAlt)
4609-
.size(IconSize::Small)
4610-
.color(if single_repo {
4611-
Color::Disabled
4612-
} else {
4613-
Color::Muted
4614-
}),
4615-
),
4604+
Icon::new(IconName::GitBranchAlt)
4605+
.size(IconSize::Small)
4606+
.color(if single_repo {
4607+
Color::Disabled
4608+
} else {
4609+
Color::Muted
4610+
}),
46164611
)
46174612
.child(repo_selector)
46184613
.when(show_separator, |this| {
46194614
this.child(
46204615
div()
4621-
.text_color(cx.theme().colors().text_muted)
46224616
.text_sm()
4617+
.text_color(cx.theme().colors().icon_muted.opacity(0.5))
46234618
.child("/"),
46244619
)
46254620
})

crates/ui/src/components/button/button_like.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ impl RenderOnce for ButtonLike {
596596
ButtonSize::Default | ButtonSize::Compact => {
597597
this.px(DynamicSpacing::Base04.rems(cx))
598598
}
599-
ButtonSize::None => this,
599+
ButtonSize::None => this.px_px(),
600600
})
601601
.border_color(style.enabled(self.layer, cx).border_color)
602602
.bg(style.enabled(self.layer, cx).background)

0 commit comments

Comments
 (0)