diff --git a/src/main.rs b/src/main.rs index 2487267..e73c1fe 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,8 @@ #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release -mod theme; mod app; +mod theme; use app::App; +use egui::ViewportBuilder; fn main() -> Result<(), eframe::Error> { // Log to stdout (if you run with `RUST_LOG=debug`). @@ -9,8 +10,7 @@ fn main() -> Result<(), eframe::Error> { // Setup the options for the default window let options = eframe::NativeOptions { - initial_window_size: Some(egui::vec2(300.0, 200.0)), - resizable: true, + viewport: ViewportBuilder::default().with_inner_size(egui::vec2(300.0, 200.0)), ..Default::default() }; @@ -18,6 +18,6 @@ fn main() -> Result<(), eframe::Error> { eframe::run_native( "egui-template", options, - Box::new(|_cc| Box::new(App::default())), + Box::new(|_cc| Ok(Box::new(App::default()))), ) -} \ No newline at end of file +}