some more bs
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use gpui::{div, prelude::*};
|
||||
|
||||
use crate::theme::Variant;
|
||||
use crate::{app, theme::Variant};
|
||||
|
||||
pub struct Screen {
|
||||
pub text: gpui::SharedString,
|
||||
@@ -10,39 +10,39 @@ impl Render for Screen {
|
||||
fn render(
|
||||
&mut self,
|
||||
_window: &mut gpui::Window,
|
||||
_cx: &mut gpui::Context<Self>,
|
||||
cx: &mut gpui::Context<Self>,
|
||||
) -> impl IntoElement {
|
||||
let builtin = Variant::VioletDark;
|
||||
let theme = builtin.theme();
|
||||
let theme = app::current_theme(cx);
|
||||
|
||||
div()
|
||||
.flex()
|
||||
.flex_col()
|
||||
.size_full()
|
||||
.gap_3()
|
||||
.flex_1()
|
||||
.flex_row()
|
||||
.w_full()
|
||||
.gap_2()
|
||||
.p_2p5()
|
||||
.pt_0()
|
||||
.bg(theme.colors.background)
|
||||
.justify_center()
|
||||
.items_center()
|
||||
.shadow_lg()
|
||||
.text_xl()
|
||||
.text_color(theme.colors.text)
|
||||
.child(format!("Hello, {}!", &self.text))
|
||||
.child(
|
||||
div()
|
||||
.text_sm()
|
||||
.text_color(theme.colors.text_muted)
|
||||
.child(format!("Built-in theme: {}", builtin.label())),
|
||||
.h_full()
|
||||
.flex()
|
||||
.w_1_3()
|
||||
.bg(theme.colors.surface)
|
||||
.rounded_lg(),
|
||||
)
|
||||
.child(
|
||||
div()
|
||||
.h_full()
|
||||
.flex()
|
||||
.gap_2()
|
||||
.child(div().size_8().bg(theme.colors.surface))
|
||||
.child(div().size_8().bg(theme.colors.surface_elevated))
|
||||
.child(div().size_8().bg(theme.colors.accent))
|
||||
.child(div().size_8().bg(theme.colors.success))
|
||||
.child(div().size_8().bg(theme.colors.warning))
|
||||
.child(div().size_8().bg(theme.colors.danger)),
|
||||
.w_2_3()
|
||||
.bg(theme.colors.surface)
|
||||
.rounded_lg(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user