Tweak footer design in the branch picker (#17408)
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 | |--------|--------| | <img width="564" alt="Screenshot 2024-09-04 at 8 07 20 PM" src="https://github.com/user-attachments/assets/2ebe411a-770b-4fad-a9b3-185ac3cbde9b"> | <img width="564" alt="Screenshot 2024-09-04 at 8 07 29 PM" src="https://github.com/user-attachments/assets/fb0ee951-c674-4ab4-bca3-4b009efd5064"> | --- Release Notes: - N/A
This commit is contained in:
parent
182f0f2ac8
commit
3738baccb2
1 changed files with 10 additions and 8 deletions
|
@ -8,10 +8,7 @@ use gpui::{
|
||||||
};
|
};
|
||||||
use picker::{Picker, PickerDelegate};
|
use picker::{Picker, PickerDelegate};
|
||||||
use std::{ops::Not, sync::Arc};
|
use std::{ops::Not, sync::Arc};
|
||||||
use ui::{
|
use ui::{prelude::*, HighlightedLabel, ListItem, ListItemSpacing};
|
||||||
h_flex, v_flex, Button, ButtonCommon, Clickable, Color, HighlightedLabel, Label, LabelCommon,
|
|
||||||
LabelSize, ListItem, ListItemSpacing, Selectable,
|
|
||||||
};
|
|
||||||
use util::ResultExt;
|
use util::ResultExt;
|
||||||
use workspace::notifications::NotificationId;
|
use workspace::notifications::NotificationId;
|
||||||
use workspace::{ModalView, Toast, Workspace};
|
use workspace::{ModalView, Toast, Workspace};
|
||||||
|
@ -300,11 +297,17 @@ impl PickerDelegate for BranchListDelegate {
|
||||||
|
|
||||||
Some(
|
Some(
|
||||||
h_flex()
|
h_flex()
|
||||||
.mr_3()
|
.p_2()
|
||||||
.pb_2()
|
.border_t_1()
|
||||||
|
.border_color(cx.theme().colors().border_variant)
|
||||||
|
.justify_end()
|
||||||
.child(h_flex().w_full())
|
.child(h_flex().w_full())
|
||||||
.child(
|
.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| {
|
.on_click(cx.listener(|_, _, cx| {
|
||||||
cx.spawn(|picker, mut cx| async move {
|
cx.spawn(|picker, mut cx| async move {
|
||||||
picker.update(&mut cx, |this, cx| {
|
picker.update(&mut cx, |this, cx| {
|
||||||
|
@ -330,7 +333,6 @@ impl PickerDelegate for BranchListDelegate {
|
||||||
})
|
})
|
||||||
.detach_and_log_err(cx);
|
.detach_and_log_err(cx);
|
||||||
}))
|
}))
|
||||||
.style(ui::ButtonStyle::Filled),
|
|
||||||
)
|
)
|
||||||
.into_any_element(),
|
.into_any_element(),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue