feat(ui): used gtk::Picture
for better image scaling
This commit is contained in:
parent
8aef97c809
commit
835cb63b88
1 changed files with 5 additions and 2 deletions
|
@ -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]
|
||||||
|
|
Loading…
Reference in a new issue