Add basic inspector
This commit is contained in:
parent
e7760e1a3f
commit
d311bd04ff
8 changed files with 240 additions and 75 deletions
|
@ -15,6 +15,11 @@ mod element_ext;
|
|||
mod theme;
|
||||
mod workspace;
|
||||
|
||||
gpui2::actions! {
|
||||
storybook,
|
||||
[ToggleInspector]
|
||||
}
|
||||
|
||||
fn main() {
|
||||
SimpleLogger::init(LevelFilter::Info, Default::default()).expect("could not initialize logger");
|
||||
|
||||
|
@ -33,7 +38,12 @@ fn main() {
|
|||
center: true,
|
||||
..Default::default()
|
||||
},
|
||||
|_| view(|cx| storybook(cx)),
|
||||
|cx| {
|
||||
view(|cx| {
|
||||
cx.enable_inspector();
|
||||
storybook(cx)
|
||||
})
|
||||
},
|
||||
);
|
||||
cx.platform().activate(true);
|
||||
});
|
||||
|
|
|
@ -406,62 +406,41 @@ pub fn workspace<V: 'static>() -> impl Element<V> {
|
|||
impl WorkspaceElement {
|
||||
fn render<V: 'static>(&mut self, _: &mut V, cx: &mut ViewContext<V>) -> impl IntoElement<V> {
|
||||
let theme = theme(cx);
|
||||
|
||||
div()
|
||||
.size_full()
|
||||
.flex()
|
||||
.flex_col()
|
||||
.font("Zed Sans Extended")
|
||||
.gap_0()
|
||||
.justify_start()
|
||||
.items_start()
|
||||
.text_color(theme.lowest.base.default.foreground)
|
||||
.fill(theme.middle.warning.default.background)
|
||||
.child(
|
||||
div()
|
||||
.w_full()
|
||||
.h_8()
|
||||
.fill(theme.lowest.negative.default.background)
|
||||
.child(titlebar()),
|
||||
)
|
||||
.child(
|
||||
div()
|
||||
.flex()
|
||||
.flex_1()
|
||||
.child(collab_panel())
|
||||
.child(div().flex_1().fill(theme.lowest.accent.default.background))
|
||||
.child(div().w_64().fill(theme.lowest.positive.default.background)),
|
||||
)
|
||||
.child(
|
||||
div()
|
||||
.w_full()
|
||||
.h_9()
|
||||
.fill(theme.lowest.positive.default.background)
|
||||
.child(statusbar())
|
||||
.child(
|
||||
div()
|
||||
.h_px()
|
||||
.w_full()
|
||||
.fill(theme.lowest.negative.default.background),
|
||||
)
|
||||
.child(
|
||||
div()
|
||||
.h_px()
|
||||
.w_full()
|
||||
.fill(theme.lowest.positive.default.background),
|
||||
)
|
||||
.child(
|
||||
div()
|
||||
.h_px()
|
||||
.w_full()
|
||||
.fill(theme.lowest.accent.default.background),
|
||||
)
|
||||
.child(
|
||||
div()
|
||||
.h_px()
|
||||
.w_full()
|
||||
.fill(theme.lowest.warning.default.background),
|
||||
),
|
||||
)
|
||||
.flex_row()
|
||||
.child(collab_panel())
|
||||
.child(collab_panel())
|
||||
|
||||
// div()
|
||||
// .size_full()
|
||||
// .flex()
|
||||
// .flex_col()
|
||||
// .font("Zed Sans Extended")
|
||||
// .gap_0()
|
||||
// .justify_start()
|
||||
// .items_start()
|
||||
// .text_color(theme.lowest.base.default.foreground)
|
||||
// // .fill(theme.middle.warning.default.background)
|
||||
// .child(titlebar())
|
||||
// .child(
|
||||
// div()
|
||||
// .flex_1()
|
||||
// .w_full()
|
||||
// .flex()
|
||||
// .flex_row()
|
||||
// .child(collab_panel())
|
||||
// // .child(
|
||||
// // div()
|
||||
// // .h_full()
|
||||
// // .flex_1()
|
||||
// // .fill(theme.highest.accent.default.background),
|
||||
// // )
|
||||
// .child(collab_panel()),
|
||||
// )
|
||||
// .child(statusbar())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue