From 9534f072e8815947ebf04918f345023770385c5c Mon Sep 17 00:00:00 2001 From: Observer KRypt0n_ Date: Mon, 1 May 2023 14:16:05 +0200 Subject: [PATCH] feat(ui): improved launcher logo rendering quality --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- src/ui/main/mod.rs | 12 ++++++++++-- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a201cc9..b984a0b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -40,8 +40,8 @@ dependencies = [ [[package]] name = "anime-game-core" -version = "1.7.2" -source = "git+https://github.com/an-anime-team/anime-game-core?tag=1.7.2#b367ea1303c9687217024902e37dbb4e24b05f37" +version = "1.8.0" +source = "git+https://github.com/an-anime-team/anime-game-core?tag=1.8.0#dbb9008bcdd6a7b8026567ff35417671a77c740e" dependencies = [ "anyhow", "bzip2", @@ -87,8 +87,8 @@ dependencies = [ [[package]] name = "anime-launcher-sdk" -version = "1.0.10" -source = "git+https://github.com/an-anime-team/anime-launcher-sdk?tag=1.0.10#204369158e57056dfc64fbff62fbe6a571034913" +version = "1.1.2" +source = "git+https://github.com/an-anime-team/anime-launcher-sdk?tag=1.1.2#b178f1050ae24b8de899adaf0f6f52ffcf6d8b53" dependencies = [ "anime-game-core", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 2fc6345..96676f3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ glib-build-tools = "0.17" [dependencies.anime-launcher-sdk] git = "https://github.com/an-anime-team/anime-launcher-sdk" -tag = "1.0.10" +tag = "1.1.2" features = ["all", "genshin"] # path = "../anime-launcher-sdk" # ! for dev purposes only diff --git a/src/ui/main/mod.rs b/src/ui/main/mod.rs index c4039ce..383395e 100644 --- a/src/ui/main/mod.rs +++ b/src/ui/main/mod.rs @@ -223,10 +223,10 @@ impl SimpleComponent for App { #[watch] set_visible: model.style == LauncherStyle::Modern, - gtk::Image { + gtk::Picture { set_resource: Some("/org/app/images/icon.png"), set_vexpand: true, - set_margin_top: 48 + set_content_fit: gtk::ContentFit::ScaleDown }, gtk::Label { @@ -253,6 +253,8 @@ impl SimpleComponent for App { set_visible: model.downloading, set_vexpand: true, + set_margin_top: 48, + set_margin_bottom: 48, add = model.progress_bar.widget(), }, @@ -273,6 +275,12 @@ impl SimpleComponent for App { #[watch] set_visible: !model.downloading, + #[watch] + set_margin_bottom: match model.style { + LauncherStyle::Modern => 48, + LauncherStyle::Classic => 0 + }, + set_vexpand: true, gtk::Box {