Remove flex_1 from bottom dock to fix pane group spacing

This commit is contained in:
Nate Butler 2023-11-18 02:06:51 -05:00
parent d6f173866e
commit f9804feefa
2 changed files with 7 additions and 22 deletions

View file

@ -24,6 +24,7 @@ use std::{
Arc, Arc,
}, },
}; };
use theme2::default_color_scales;
use ui::v_stack; use ui::v_stack;
use ui::{prelude::*, Icon, IconButton, IconElement, TextColor, Tooltip}; use ui::{prelude::*, Icon, IconButton, IconElement, TextColor, Tooltip};
use util::truncate_and_remove_front; use util::truncate_and_remove_front;
@ -1480,15 +1481,10 @@ impl Pane {
// Right Side // Right Side
.child( .child(
div() div()
// We only use absolute here since we don't
// have opacity or `hidden()` yet
.absolute()
.neg_top_7()
.px_1() .px_1()
.flex() .flex()
.flex_none() .flex_none()
.gap_2() .gap_2()
.group_hover("tab_bar", |this| this.top_0())
// Nav Buttons // Nav Buttons
.child( .child(
div() div()
@ -1931,9 +1927,11 @@ impl Render for Pane {
.map(|task| task.detach_and_log_err(cx)); .map(|task| task.detach_and_log_err(cx));
}) })
.child(self.render_tab_bar(cx)) .child(self.render_tab_bar(cx))
.child(div() /* todo!(toolbar) */) // .child(
// div()
// ) /* todo!(toolbar) */
.child(if let Some(item) = self.active_item() { .child(if let Some(item) = self.active_item() {
div().flex_1().child(item.to_any()) div().flex().flex_1().child(item.to_any())
} else { } else {
// todo!() // todo!()
div().child("Empty Pane") div().child("Empty Pane")

View file

@ -63,7 +63,7 @@ use std::{
sync::{atomic::AtomicUsize, Arc}, sync::{atomic::AtomicUsize, Arc},
time::Duration, time::Duration,
}; };
use theme2::{ActiveTheme, ThemeSettings}; use theme2::{default_color_scales, ActiveTheme, ThemeSettings};
pub use toolbar::{ToolbarItemEvent, ToolbarItemLocation, ToolbarItemView}; pub use toolbar::{ToolbarItemEvent, ToolbarItemLocation, ToolbarItemView};
pub use ui; pub use ui;
use util::ResultExt; use util::ResultExt;
@ -3666,7 +3666,7 @@ impl Render for Workspace {
&self.app_state, &self.app_state,
cx, cx,
)) ))
.child(div().flex().flex_1().child(self.bottom_dock.clone())), .child(self.bottom_dock.clone()),
) )
// Right Dock // Right Dock
.child( .child(
@ -3679,19 +3679,6 @@ impl Render for Workspace {
), ),
) )
.child(self.status_bar.clone()) .child(self.status_bar.clone())
.z_index(8)
// Debug
.child(
div()
.flex()
.flex_col()
.z_index(9)
.absolute()
.top_20()
.left_1_4()
.w_40()
.gap_2(),
)
} }
} }