diff --git a/Cargo.toml b/Cargo.toml index d9a4f20..855fd9d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ features = ["v2_74"] [dependencies.adw] package = "libadwaita" version = "0.6.0" -features = ["v1_4"] +features = ["v1_5"] [dependencies.gettext-rs] version = "0.7.0" diff --git a/src/about.rs b/src/about.rs index 6365ac1..a8b2bd8 100644 --- a/src/about.rs +++ b/src/about.rs @@ -21,11 +21,11 @@ use gettextrs::gettext; use crate::config; -pub async fn window() -> adw::AboutWindow { +pub async fn dialog() -> adw::AboutDialog { // Builders are a pattern that allow you to create // an object and set all relevant properties very // easily in a way that's idiomatic to Rust. - adw::AboutWindow::builder() + adw::AboutDialog::builder() .application_name(gettext("Image Viewer")) .application_icon(config::APP_ID) .version(config::VERSION) diff --git a/src/application.rs b/src/application.rs index 6513078..f3b8612 100644 --- a/src/application.rs +++ b/src/application.rs @@ -207,13 +207,10 @@ impl LpApplication { } pub async fn show_about(&self) { - let about = about::window().await; + let about = about::dialog().await; + let window = self.active_window().unwrap(); - if let Some(window) = self.active_window() { - about.set_transient_for(Some(&window)); - } - - about.present(); + about.present(&window); } pub fn show_help(&self) { diff --git a/src/window.ui b/src/window.ui index 634662e..8ac0798 100644 --- a/src/window.ui +++ b/src/window.ui @@ -60,7 +60,7 @@ 600 498 360 - 360 + 294 max-width: 590sp @@ -220,4 +220,4 @@ - \ No newline at end of file +