DEVELOPMENT ENVIRONMENT

~liljamo/gandalf

ref: c4b6b2551ab961b415b6ad29c225003e635bff55 gandalf/src/main.rs -rw-r--r-- 1.2 KiB
c4b6b255Jonni Liljamo feat: initial working(tm) version 1 year, 8 months ago
                                                                                
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
39
40
41
42
43
44
45
46
use iced::{self, window, Application, Font, Settings};

mod gandalf;
mod input;
mod programs;
mod theme;

pub const FONT_REGULAR: Font = Font::External {
    name: "default",
    bytes: include_bytes!("../fonts/FiraCode-Regular.ttf"),
};

pub const FONT_MEDIUM: Font = Font::External {
    name: "default",
    bytes: include_bytes!("../fonts/FiraCode-Medium.ttf"),
};

pub const FONT_BOLD: Font = Font::External {
    name: "default",
    bytes: include_bytes!("../fonts/FiraCode-Bold.ttf"),
};

pub fn main() -> iced::Result {
    gandalf::Gandalf::run(Settings {
        id: Some("gandalf".to_owned()),
        window: window::Settings {
            size: (1, 1),
            position: window::Position::Specific(0, 0),
            min_size: None,
            max_size: None,
            visible: true,
            resizable: false,
            decorations: false,
            transparent: true,
            always_on_top: true,
            icon: None,
        },
        flags: (),
        default_font: Some(include_bytes!("../fonts/FiraCode-Regular.ttf")),
        default_text_size: 30,
        text_multithreading: true,
        antialiasing: true,
        exit_on_close_request: false,
        try_opengles_first: false,
    })
}