Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…-launcher into next
  • Loading branch information
krypt0nn committed Aug 3, 2023
2 parents 87d4e6c + f472a6b commit 51d7b26
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/ui/first_run/welcome.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
},

Expand Down
14 changes: 4 additions & 10 deletions src/ui/preferences/general/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 51d7b26

Please sign in to comment.