From 31565a810d764c3247a73117182294e8fad47b62 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Fri, 24 Nov 2023 09:16:19 -0500 Subject: [PATCH] Outline statusbar items --- crates/workspace2/src/status_bar.rs | 87 ++++++++++++++++++++++++++++- 1 file changed, 84 insertions(+), 3 deletions(-) diff --git a/crates/workspace2/src/status_bar.rs b/crates/workspace2/src/status_bar.rs index 091282b4d963152619b2af958540cb6ae55cbcf6..c18cc883791f31ab0dd502a7fc63e73ccc733df7 100644 --- a/crates/workspace2/src/status_bar.rs +++ b/crates/workspace2/src/status_bar.rs @@ -6,7 +6,7 @@ use gpui::{ WindowContext, }; use theme2::ActiveTheme; -use ui::h_stack; +use ui::{h_stack, Button, Icon, IconButton}; use util::ResultExt; pub trait StatusItemView: Render { @@ -47,8 +47,89 @@ impl Render for StatusBar { .w_full() .h_8() .bg(cx.theme().colors().status_bar_background) - .child(self.render_left_tools(cx)) - .child(self.render_right_tools(cx)) + // Nate: I know this isn't how we render status bar tools + // We can move these to the correct place once we port their tools + .child( + h_stack().gap_1().child(self.render_left_tools(cx)).child( + h_stack().gap_4().child( + // TODO: Language Server status + div() + .border() + .border_color(gpui::red()) + .child("Checking..."), + ), + ), + ) + .child( + h_stack() + .gap_4() + .child( + h_stack() + .gap_1() + .child( + // TODO: Line / column numbers + div() + .border() + .border_color(gpui::red()) + .child(Button::new("15:22")), + ) + .child( + // TODO: Language picker + div() + .border() + .border_color(gpui::red()) + .child(Button::new("Rust")), + ), + ) + .child( + h_stack() + .gap_1() + .child( + // Github tool + div() + .border() + .border_color(gpui::red()) + .child(IconButton::new("status-github", Icon::Hash)), + ) + .child( + // Feedback Tool + div() + .border() + .border_color(gpui::red()) + .child(IconButton::new("status-feedback", Icon::Envelope)), + ), + ) + .child( + // Bottom Dock + h_stack().gap_1().child( + // Terminal + div() + .border() + .border_color(gpui::red()) + .child(IconButton::new("status-terminal", Icon::Terminal)), + ), + ) + .child( + // Right Dock + h_stack() + .gap_1() + .child( + // Terminal + div() + .border() + .border_color(gpui::red()) + .child(IconButton::new("status-assistant", Icon::Ai)), + ) + .child( + // Terminal + div() + .border() + .border_color(gpui::red()) + .child(IconButton::new("status-chat", Icon::MessageBubbles)), + ), + ) + .child(self.render_right_tools(cx)), + ) } }