diff --git a/CHANGELOG.md b/CHANGELOG.md index 627562a..54a364b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated Italian - Updated Japanese -## [1.3.0] +### Fixed + +- Fixed logo size in the first run window + +## [1.3.0] - 02.08.2023 ### Added diff --git a/src/ui/first_run/welcome.rs b/src/ui/first_run/welcome.rs index 55d4fca..2a0c964 100644 --- a/src/ui/first_run/welcome.rs +++ b/src/ui/first_run/welcome.rs @@ -28,8 +28,8 @@ impl SimpleAsyncComponent for WelcomeApp { set_valign: gtk::Align::Center, set_vexpand: true, - gtk::Image { - set_icon_name: Some(APP_ID), + gtk::Picture { + set_resource: Some(&format!("{APP_RESOURCE_PATH}/icons/hicolor/scalable/apps/{APP_ID}.png")), set_height_request: 128 }, diff --git a/src/ui/preferences/general/mod.rs b/src/ui/preferences/general/mod.rs index 11a0f42..aad99fc 100644 --- a/src/ui/preferences/general/mod.rs +++ b/src/ui/preferences/general/mod.rs @@ -200,21 +200,15 @@ impl SimpleAsyncComponent for GeneralApp { &tr!("china") ])), - set_selected: match CONFIG.launcher.edition { - GameEdition::Global => 0, - GameEdition::China => 1 - }, + set_selected: GameEdition::list().iter() + .position(|edition| edition == &CONFIG.launcher.edition) + .unwrap() as u32, connect_selected_notify[sender] => move |row| { if is_ready() { #[allow(unused_must_use)] if let Ok(mut config) = Config::get() { - config.launcher.edition = match row.selected() { - 0 => GameEdition::Global, - 1 => GameEdition::China, - - _ => unreachable!() - }; + config.launcher.edition = GameEdition::list()[row.selected() as usize]; Config::update(config);