Checkpoint

This commit is contained in:
Nate Butler 2023-09-11 10:36:49 -04:00
parent e84e791dde
commit 2774eae21a
5 changed files with 22 additions and 32 deletions

View file

@ -23,10 +23,11 @@ pub fn icon_button<V: 'static>(path: &'static str, variant: ButtonVariant) -> im
impl IconButton { impl IconButton {
fn render<V: 'static>(&mut self, _: &mut V, cx: &mut ViewContext<V>) -> impl IntoElement<V> { fn render<V: 'static>(&mut self, _: &mut V, cx: &mut ViewContext<V>) -> impl IntoElement<V> {
let theme = theme(cx); let theme = theme(cx);
let mut div = div(); let mut div = div();
if self.variant == ButtonVariant::Filled { if self.variant == ButtonVariant::Filled {
div = div.fill(theme.highest.base.default.background); div = div.fill(theme.highest.negative.default.background);
} }
div.w_7() div.w_7()

View file

@ -1,5 +1,4 @@
use crate::theme::theme; use crate::theme::theme;
use gpui2::elements::svg;
use gpui2::style::{StyleHelpers, Styleable}; use gpui2::style::{StyleHelpers, Styleable};
use gpui2::{elements::div, IntoElement}; use gpui2::{elements::div, IntoElement};
use gpui2::{Element, ParentElement, ViewContext}; use gpui2::{Element, ParentElement, ViewContext};

View file

@ -28,10 +28,6 @@ impl<V: 'static> TabBar<V> {
div() div()
.w_full() .w_full()
.flex() .flex()
.items_center()
.overflow_hidden()
.justify_between()
.fill(theme.highest.base.default.background)
// Left Side // Left Side
.child( .child(
div() div()
@ -49,15 +45,8 @@ impl<V: 'static> TabBar<V> {
.child(icon_button("icons/arrow_right.svg", ButtonVariant::Ghost)), .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( .child(
div().w_0().flex_1().h_full().child(
div() div()
.flex() .flex()
.gap_px() .gap_px()

View file

@ -36,7 +36,7 @@ fn main() {
cx.add_window( cx.add_window(
gpui2::WindowOptions { 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, center: true,
..Default::default() ..Default::default()
}, },

View file

@ -38,7 +38,7 @@ impl WorkspaceElement {
.flex() .flex()
.flex_row() .flex_row()
.overflow_hidden() .overflow_hidden()
// .child(collab_panel(self.left_scroll_state.clone())) .child(collab_panel(self.left_scroll_state.clone()))
.child( .child(
div() div()
.h_full() .h_full()
@ -50,8 +50,9 @@ impl WorkspaceElement {
.flex_col() .flex_col()
.flex_1() .flex_1()
.child(tab_bar(self.tab_bar_scroll_state.clone())), .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()) .child(statusbar())
} }