summaryrefslogtreecommitdiff
path: root/schist_desktop_gui/src/main.rs
blob: 6dd2622abbd1f8e93122e5a1ae23b99f10dd24a3 (plain)
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
mod config;
mod database_connection;
mod dialog;
mod gui;
mod paths;
mod settings;
mod shortcut;
mod style;
mod theme;
mod traits;
mod window_settings;

pub use database_connection::DatabaseConnection;

use anyhow::Context;

use crate::{
    config::Config, gui::Gui, settings::make_settings, theme::make_theme,
    window_settings::make_window_settings,
};

fn main() -> anyhow::Result<()> {
    let config = Config::default();
    iced::application("Schist", Gui::update, Gui::view)
        .settings(make_settings(&config.clone()))
        .subscription(gui::subscription)
        .theme(make_theme)
        .window(make_window_settings(&config.clone()))
        .run_with(Gui::new)
        .context("Failed to run Schist GUI")
}