Add model management and macOS integration
This commit is contained in:
23
src/main.rs
23
src/main.rs
@@ -1,19 +1,24 @@
|
||||
mod app;
|
||||
mod database;
|
||||
mod model;
|
||||
#[cfg(target_os = "macos")]
|
||||
mod native_menu;
|
||||
mod schema;
|
||||
|
||||
use app::{App, app_theme};
|
||||
use iced::{Size, Task};
|
||||
use app::{App, Message, app_icon, app_theme};
|
||||
use iced::{Size, window};
|
||||
|
||||
fn main() -> iced::Result {
|
||||
iced::application("DS4Server", App::update, App::view)
|
||||
iced::daemon(App::title, App::update, App::view)
|
||||
.subscription(App::subscription)
|
||||
.theme(|_| app_theme())
|
||||
.window(iced::window::Settings {
|
||||
size: Size::new(1120.0, 720.0),
|
||||
min_size: Some(Size::new(760.0, 480.0)),
|
||||
..Default::default()
|
||||
.theme(|_, _| app_theme())
|
||||
.run_with(|| {
|
||||
let (main_window, open) = window::open(window::Settings {
|
||||
size: Size::new(1120.0, 720.0),
|
||||
min_size: Some(Size::new(760.0, 480.0)),
|
||||
icon: Some(app_icon()),
|
||||
..Default::default()
|
||||
});
|
||||
(App::load(main_window), open.map(Message::WindowOpened))
|
||||
})
|
||||
.run_with(|| (App::load(), Task::none()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user