1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#![cfg_attr(
    all(not(debug_assertions), target_os = "windows"),
    windows_subsystem = "windows"
)]

use freya::prelude::*;

const ICON: &[u8] = include_bytes!("../assets/icon.png");

fn main() {
    launch_cfg(
        app,
        LaunchConfig::<()>::builder()
            .with_title("Freya & cargo-packager")
            .with_width(400.)
            .with_height(300.)
            .with_icon(LaunchConfig::load_icon(ICON))
            .build(),
    )
}

fn app(cx: Scope) -> Element {
    render!(
        rect {
            width: "100%",
            height: "100%",
            background: "rgb(1, 116, 190)",
            main_align: "center",
            label {
                width: "100%",
                font_size: "35",
                text_align: "center",
                color: "white",
                "freya 🦀 & cargo-packager 📦"
            }
        }
    )
}