use gpui::{AppContext, ParentElement, Styled, div}; use crate::{app, screen::dashboard::titlebar}; pub(crate) struct Screen { titlebar: gpui::Entity, } pub(crate) fn new(cx: &mut gpui::App) -> Screen { Screen { titlebar: cx.new(|cx| titlebar::new(cx)), } } impl gpui::Render for Screen { fn render( &mut self, _window: &mut gpui::Window, cx: &mut gpui::Context, ) -> impl gpui::IntoElement { let theme = app::current_theme(cx); div() .flex() .flex_col() .bg(theme.colors.background) .size_full() .child(self.titlebar.clone()) .child( div() .flex() .flex_row() .flex_1() .w_full() .gap_2() .px_3() .pb_3() .child(div().w_1_4().h_full().rounded_lg().bg(theme.colors.surface)) .child(div().w_3_4().h_full().rounded_lg().bg(theme.colors.surface)), ) } }