Skip to content

Commit

Permalink
Set hide on close for about window to prevent destroy on close
Browse files Browse the repository at this point in the history
  • Loading branch information
m4dh0rs3 committed Mar 5, 2024
1 parent ec9f9ca commit 4182ce4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/modals/about.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl SimpleComponent for AboutDialog {
type Root = adw::AboutWindow;

fn init_root() -> Self::Root {
adw::AboutWindow::builder()
let about_window = adw::AboutWindow::builder()
.application_icon(APP_ID)
// Insert your license of choice here
// .license_type(gtk::License::MitX11)
Expand All @@ -28,7 +28,10 @@ impl SimpleComponent for AboutDialog {
.copyright("© 2023 Bilal Elmoussaoui")
.developers(vec!["Bilal Elmoussaoui"])
.designers(vec!["Bilal Elmoussaoui"])
.build()
.build();

about_window.set_hide_on_close(true);
about_window
}

fn init(
Expand All @@ -47,3 +50,4 @@ impl SimpleComponent for AboutDialog {
dialog.present();
}
}

0 comments on commit 4182ce4

Please sign in to comment.