feat(ui): improved launcher logo rendering quality

This commit is contained in:
Observer KRypt0n_ 2023-05-01 14:16:05 +02:00
parent aa5215533a
commit 9534f072e8
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
3 changed files with 15 additions and 7 deletions

8
Cargo.lock generated
View file

@ -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",

View file

@ -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

View file

@ -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 {