From 3738baccb25e1fb0a0bde472c841d7878db9a485 Mon Sep 17 00:00:00 2001
From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Date: Thu, 5 Sep 2024 09:23:26 -0300
Subject: [PATCH] Tweak footer design in the branch picker (#17408)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This PR adds a small design touch-up to the footer that appears once you
type out a branch name that doesn't exist and is thus available to be
added as a new branch.
| Before | After |
|--------|--------|
|
|
|
---
Release Notes:
- N/A
---
crates/vcs_menu/src/lib.rs | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/crates/vcs_menu/src/lib.rs b/crates/vcs_menu/src/lib.rs
index f2c5985943..a9fc5415e4 100644
--- a/crates/vcs_menu/src/lib.rs
+++ b/crates/vcs_menu/src/lib.rs
@@ -8,10 +8,7 @@ use gpui::{
};
use picker::{Picker, PickerDelegate};
use std::{ops::Not, sync::Arc};
-use ui::{
- h_flex, v_flex, Button, ButtonCommon, Clickable, Color, HighlightedLabel, Label, LabelCommon,
- LabelSize, ListItem, ListItemSpacing, Selectable,
-};
+use ui::{prelude::*, HighlightedLabel, ListItem, ListItemSpacing};
use util::ResultExt;
use workspace::notifications::NotificationId;
use workspace::{ModalView, Toast, Workspace};
@@ -300,11 +297,17 @@ impl PickerDelegate for BranchListDelegate {
Some(
h_flex()
- .mr_3()
- .pb_2()
+ .p_2()
+ .border_t_1()
+ .border_color(cx.theme().colors().border_variant)
+ .justify_end()
.child(h_flex().w_full())
.child(
- Button::new("branch-picker-create-branch-button", "Create branch")
+ Button::new("branch-picker-create-branch-button", "Create Branch")
+ .icon(IconName::Plus)
+ .icon_size(IconSize::Small)
+ .icon_color(Color::Muted)
+ .icon_position(IconPosition::Start)
.on_click(cx.listener(|_, _, cx| {
cx.spawn(|picker, mut cx| async move {
picker.update(&mut cx, |this, cx| {
@@ -330,7 +333,6 @@ impl PickerDelegate for BranchListDelegate {
})
.detach_and_log_err(cx);
}))
- .style(ui::ButtonStyle::Filled),
)
.into_any_element(),
)