Skip to content

Commit f2a530f

Browse files
felinirabilelmoussaoui
authored andcommitted
gtk::show_about_dialog: Set hide_on_close
Closes #1544
1 parent 0b3cb47 commit f2a530f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

gtk4/src/functions.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,14 +236,16 @@ pub fn show_about_dialog<P: IsA<Window>>(parent: Option<&P>, properties: &[(&str
236236
builder = builder.property(key, *value);
237237
}
238238
let about_dialog = builder.build();
239-
about_dialog.set_transient_for(parent);
240-
about_dialog.set_modal(true);
241-
about_dialog.set_destroy_with_parent(true);
239+
about_dialog.set_hide_on_close(true);
242240

243241
// cache the dialog if a parent is set
244242
if let Some(dialog_parent) = parent {
243+
about_dialog.set_modal(true);
244+
about_dialog.set_transient_for(parent);
245+
about_dialog.set_destroy_with_parent(true);
245246
dialog_parent.set_qdata(quark, about_dialog.clone());
246247
}
248+
247249
about_dialog.show();
248250
};
249251
}

0 commit comments

Comments
 (0)