feat(ui): used gtk::Picture for better image scaling

This commit is contained in:
Observer KRypt0n_ 2023-04-22 19:27:54 +02:00
parent 8aef97c809
commit 835cb63b88
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2

View file

@ -223,10 +223,10 @@ impl SimpleComponent for App {
#[watch] #[watch]
set_visible: model.style == LauncherStyle::Modern, set_visible: model.style == LauncherStyle::Modern,
gtk::Image { gtk::Picture {
set_resource: Some("/org/app/images/icon.png"), set_resource: Some("/org/app/images/icon.png"),
set_vexpand: true, set_vexpand: true,
set_margin_top: 48 set_content_fit: gtk::ContentFit::ScaleDown
}, },
gtk::Label { gtk::Label {
@ -253,6 +253,8 @@ impl SimpleComponent for App {
set_visible: model.downloading, set_visible: model.downloading,
set_vexpand: true, set_vexpand: true,
set_margin_top: 48,
set_margin_bottom: 48,
add = model.progress_bar.widget(), add = model.progress_bar.widget(),
}, },
@ -274,6 +276,7 @@ impl SimpleComponent for App {
set_visible: !model.downloading, set_visible: !model.downloading,
set_vexpand: true, set_vexpand: true,
set_margin_bottom: 48,
gtk::Box { gtk::Box {
#[watch] #[watch]