Merge workspace and collab panel demos

This commit is contained in:
Nate Butler 2023-09-07 12:55:47 -04:00
parent a87711d157
commit 23a8d8fba4
2 changed files with 36 additions and 28 deletions

View file

@ -23,7 +23,7 @@ impl<V: 'static> CollabPanelElement<V> {
// Panel // Panel
div() div()
.full() .w_96()
.flex() .flex()
.flex_col() .flex_col()
.font("Zed Sans Extended") .font("Zed Sans Extended")

View file

@ -1,4 +1,4 @@
use crate::theme::theme; use crate::{collab_panel::collab_panel, theme::theme};
use gpui2::{ use gpui2::{
elements::{div, svg}, elements::{div, svg},
geometry::pixels, geometry::pixels,
@ -247,31 +247,38 @@ impl StatusBar {
) )
// === Diagnostics === // // === Diagnostics === //
.child( .child(
div().flex().items_center().gap_2() div()
.child( .flex()
div() .items_center()
.h_full() .gap_2()
.flex() .child(
.items_center() div()
.justify_center() .h_full()
.gap_0p5() .flex()
.px_1() .items_center()
.text_color(theme.lowest.variant.default.foreground) .justify_center()
.hover() .gap_0p5()
.fill(theme.lowest.base.hovered.background) .px_1()
.active() .text_color(theme.lowest.variant.default.foreground)
.fill(theme.lowest.base.pressed.background) .hover()
.child( .fill(theme.lowest.base.hovered.background)
svg() .active()
.path("icons/error.svg") .fill(theme.lowest.base.pressed.background)
.w_4() .child(
.h_4() svg()
.fill(theme.lowest.negative.default.foreground), .path("icons/error.svg")
) .w_4()
.child(div().text_sm().child("2")), .h_4()
) .fill(theme.lowest.negative.default.foreground),
.child(div().text_sm().text_color(theme.lowest.variant.default.foreground).child("Something is wrong")), )
.child(div().text_sm().child("2")),
)
.child(
div()
.text_sm()
.text_color(theme.lowest.variant.default.foreground)
.child("Something is wrong"),
),
) )
} }
@ -340,11 +347,12 @@ impl WorkspaceElement {
.w_full() .w_full()
.flex() .flex()
.flex_col() .flex_col()
.gap_y_0()
.font("Zed Sans Extended") .font("Zed Sans Extended")
.text_color(theme.lowest.base.default.foreground) .text_color(theme.lowest.base.default.foreground)
.fill(theme.middle.base.default.background) .fill(theme.middle.base.default.background)
.child(titlebar()) .child(titlebar())
.child(div().child("panes")) .child(collab_panel())
.child(statusbar()) .child(statusbar())
} }
} }