diff --git a/Cargo.toml b/Cargo.toml index ac691b5..52f59d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -67,13 +67,13 @@ version = "0.9.4" [dependencies.eframe] optional = true -version = "0.26.0" +version = "0.28.1" default-features = false features = ["accesskit", "default_fonts", "glow", "persistence"] [dependencies.egui] optional = true -version = "0.26.0" +version = "0.28.1" [dependencies.rfd] optional = true diff --git a/src/bin/topola-egui/main.rs b/src/bin/topola-egui/main.rs index 7d51971..8db9091 100644 --- a/src/bin/topola-egui/main.rs +++ b/src/bin/topola-egui/main.rs @@ -21,6 +21,7 @@ use unic_langid::{langid, LanguageIdentifier}; #[cfg(not(target_arch = "wasm32"))] fn main() -> eframe::Result<()> { env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`). + let langid = if let Some(langname) = get_locale() { langname.parse().unwrap_or(langid!("en-US")) } else { @@ -36,7 +37,7 @@ fn main() -> eframe::Result<()> { eframe::run_native( "topola-egui", native_options, - Box::new(|cc| Box::new(App::new(cc, langid))), + Box::new(|cc| Ok(Box::new(App::new(cc, langid)))), ) }