Updated main app setup to reflect latest version boilerplate
This commit is contained in:
parent
282a27ced6
commit
0960021ec3
@ -1,7 +1,8 @@
|
|||||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release
|
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release
|
||||||
mod theme;
|
|
||||||
mod app;
|
mod app;
|
||||||
|
mod theme;
|
||||||
use app::App;
|
use app::App;
|
||||||
|
use egui::ViewportBuilder;
|
||||||
|
|
||||||
fn main() -> Result<(), eframe::Error> {
|
fn main() -> Result<(), eframe::Error> {
|
||||||
// Log to stdout (if you run with `RUST_LOG=debug`).
|
// 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
|
// Setup the options for the default window
|
||||||
let options = eframe::NativeOptions {
|
let options = eframe::NativeOptions {
|
||||||
initial_window_size: Some(egui::vec2(300.0, 200.0)),
|
viewport: ViewportBuilder::default().with_inner_size(egui::vec2(300.0, 200.0)),
|
||||||
resizable: true,
|
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -18,6 +18,6 @@ fn main() -> Result<(), eframe::Error> {
|
|||||||
eframe::run_native(
|
eframe::run_native(
|
||||||
"egui-template",
|
"egui-template",
|
||||||
options,
|
options,
|
||||||
Box::new(|_cc| Box::new(App::default())),
|
Box::new(|_cc| Ok(Box::new(App::default()))),
|
||||||
)
|
)
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user