theme/
theme.rs

1use arkham::prelude::*;
2
3fn main() {
4    App::new(root)
5        .insert_resource(Theme::default())
6        .run()
7        .expect("couldnt launch app");
8}
9
10fn root(ctx: &mut ViewContext, theme: Res<Theme>) {
11    let size = ctx.size();
12    ctx.paint(size, theme.bg_primary);
13    ctx.paint(Rect::new((5, 5), size - 10), theme.bg_secondary);
14    ctx.insert((10, 10), "Hello World");
15    ctx.insert(
16        ((size.width / 2) - 7, 0),
17        "Press Q to Quit".to_runes().fg(theme.fg),
18    );
19}