diff --git a/crates/storybook/src/component/icon_button.rs b/crates/storybook/src/component/icon_button.rs index 50241acbe8ef09544ab23a7230fa62c7058af10f..91c61b363da78ec6baa41474961768b33b5e6e04 100644 --- a/crates/storybook/src/component/icon_button.rs +++ b/crates/storybook/src/component/icon_button.rs @@ -23,10 +23,11 @@ pub fn icon_button(path: &'static str, variant: ButtonVariant) -> im impl IconButton { fn render(&mut self, _: &mut V, cx: &mut ViewContext) -> impl IntoElement { let theme = theme(cx); + let mut div = div(); if self.variant == ButtonVariant::Filled { - div = div.fill(theme.highest.base.default.background); + div = div.fill(theme.highest.negative.default.background); } div.w_7() diff --git a/crates/storybook/src/component/tab.rs b/crates/storybook/src/component/tab.rs index 91a0fb1be1c9b08dcae6c5cb32b2cfb57d6329d0..4aae374f802466d672a0b16b66f63e3f424bb831 100644 --- a/crates/storybook/src/component/tab.rs +++ b/crates/storybook/src/component/tab.rs @@ -1,5 +1,4 @@ use crate::theme::theme; -use gpui2::elements::svg; use gpui2::style::{StyleHelpers, Styleable}; use gpui2::{elements::div, IntoElement}; use gpui2::{Element, ParentElement, ViewContext}; diff --git a/crates/storybook/src/module/tab_bar.rs b/crates/storybook/src/module/tab_bar.rs index c3d145ed83c369e84ea9b7cc5a0d0ff45f856b3c..8dc2e8cfd43d613a784622e9482f48f928067ac9 100644 --- a/crates/storybook/src/module/tab_bar.rs +++ b/crates/storybook/src/module/tab_bar.rs @@ -28,10 +28,6 @@ impl TabBar { div() .w_full() .flex() - .items_center() - .overflow_hidden() - .justify_between() - .fill(theme.highest.base.default.background) // Left Side .child( div() @@ -49,29 +45,22 @@ impl TabBar { .child(icon_button("icons/arrow_right.svg", ButtonVariant::Ghost)), ), ) - // Tabs .child( - div() - .flex_1() - .py_1() - .overflow_hidden() - .items_center() - .fill(theme.highest.accent.default.background) - .child( - div() - .flex() - .gap_px() - .overflow_x_scroll(self.scroll_state.clone()) - .child(tab("Cargo.toml", false)) - .child(tab("Channels Panel", true)) - .child(tab("channels_panel.rs", false)) - .child(tab("workspace.rs", false)) - .child(tab("icon_button.rs", false)) - .child(tab("storybook.rs", false)) - .child(tab("theme.rs", false)) - .child(tab("theme_registry.rs", false)) - .child(tab("styleable_helpers.rs", false)), - ), + div().w_0().flex_1().h_full().child( + div() + .flex() + .gap_px() + .overflow_x_scroll(self.scroll_state.clone()) + .child(tab("Cargo.toml", false)) + .child(tab("Channels Panel", true)) + .child(tab("channels_panel.rs", false)) + .child(tab("workspace.rs", false)) + .child(tab("icon_button.rs", false)) + .child(tab("storybook.rs", false)) + .child(tab("theme.rs", false)) + .child(tab("theme_registry.rs", false)) + .child(tab("styleable_helpers.rs", false)), + ), ) // Right Side .child( diff --git a/crates/storybook/src/storybook.rs b/crates/storybook/src/storybook.rs index 9a7868a9e75e5b0726123f9d538b5795369671b7..1d44129ea838d68560a0035f63589e704a9c197b 100644 --- a/crates/storybook/src/storybook.rs +++ b/crates/storybook/src/storybook.rs @@ -36,7 +36,7 @@ fn main() { cx.add_window( gpui2::WindowOptions { - bounds: WindowBounds::Fixed(RectF::new(vec2f(0., 0.), vec2f(700., 900.))), + bounds: WindowBounds::Fixed(RectF::new(vec2f(0., 0.), vec2f(1600., 900.))), center: true, ..Default::default() }, diff --git a/crates/storybook/src/workspace.rs b/crates/storybook/src/workspace.rs index bbdfb22788c77871777cd0b3f233d2e92c196d2c..ca55f9d3cc1fd7b642a7515fb244ac6156d62ebd 100644 --- a/crates/storybook/src/workspace.rs +++ b/crates/storybook/src/workspace.rs @@ -38,7 +38,7 @@ impl WorkspaceElement { .flex() .flex_row() .overflow_hidden() - // .child(collab_panel(self.left_scroll_state.clone())) + .child(collab_panel(self.left_scroll_state.clone())) .child( div() .h_full() @@ -50,8 +50,9 @@ impl WorkspaceElement { .flex_col() .flex_1() .child(tab_bar(self.tab_bar_scroll_state.clone())), - ), - ), // .child(collab_panel(self.right_scroll_state.clone())), + ) + .child(collab_panel(self.right_scroll_state.clone())), + ), ) .child(statusbar()) }