mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-11 12:46:07 +00:00
Add spacing between tab bar buttons (#3799)
This PR adds spacing between buttons in the tab bar. Release Notes: - N/A
This commit is contained in:
parent
e1d8e2001b
commit
f03ee1ea24
1 changed files with 23 additions and 18 deletions
|
@ -377,6 +377,7 @@ impl Pane {
|
||||||
can_split: true,
|
can_split: true,
|
||||||
render_tab_bar_buttons: Rc::new(move |pane, cx| {
|
render_tab_bar_buttons: Rc::new(move |pane, cx| {
|
||||||
h_stack()
|
h_stack()
|
||||||
|
.gap_2()
|
||||||
.child(
|
.child(
|
||||||
IconButton::new("plus", Icon::Plus)
|
IconButton::new("plus", Icon::Plus)
|
||||||
.icon_size(IconSize::Small)
|
.icon_size(IconSize::Small)
|
||||||
|
@ -1657,6 +1658,9 @@ impl Pane {
|
||||||
TabBar::new("tab_bar")
|
TabBar::new("tab_bar")
|
||||||
.track_scroll(self.tab_bar_scroll_handle.clone())
|
.track_scroll(self.tab_bar_scroll_handle.clone())
|
||||||
.start_child(
|
.start_child(
|
||||||
|
h_stack()
|
||||||
|
.gap_2()
|
||||||
|
.child(
|
||||||
IconButton::new("navigate_backward", Icon::ArrowLeft)
|
IconButton::new("navigate_backward", Icon::ArrowLeft)
|
||||||
.icon_size(IconSize::Small)
|
.icon_size(IconSize::Small)
|
||||||
.on_click({
|
.on_click({
|
||||||
|
@ -1666,7 +1670,7 @@ impl Pane {
|
||||||
.disabled(!self.can_navigate_backward())
|
.disabled(!self.can_navigate_backward())
|
||||||
.tooltip(|cx| Tooltip::for_action("Go Back", &GoBack, cx)),
|
.tooltip(|cx| Tooltip::for_action("Go Back", &GoBack, cx)),
|
||||||
)
|
)
|
||||||
.start_child(
|
.child(
|
||||||
IconButton::new("navigate_forward", Icon::ArrowRight)
|
IconButton::new("navigate_forward", Icon::ArrowRight)
|
||||||
.icon_size(IconSize::Small)
|
.icon_size(IconSize::Small)
|
||||||
.on_click({
|
.on_click({
|
||||||
|
@ -1675,6 +1679,7 @@ impl Pane {
|
||||||
})
|
})
|
||||||
.disabled(!self.can_navigate_forward())
|
.disabled(!self.can_navigate_forward())
|
||||||
.tooltip(|cx| Tooltip::for_action("Go Forward", &GoForward, cx)),
|
.tooltip(|cx| Tooltip::for_action("Go Forward", &GoForward, cx)),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
.end_child({
|
.end_child({
|
||||||
let render_tab_buttons = self.render_tab_bar_buttons.clone();
|
let render_tab_buttons = self.render_tab_bar_buttons.clone();
|
||||||
|
|
Loading…
Reference in a new issue