Browse Source

Set parent window in About dialog

Fixes dialog text not always fitting in screen. Additionally,
the dialog is now centered instead of appearing at the bottom
of the screen.
Pablo Correa Gómez 3 năm trước cách đây
mục cha
commit
e29b00f068
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      src/main.c

+ 2 - 1
src/main.c

@@ -525,7 +525,8 @@ run_capture_action(GSimpleAction *action, GVariant *param, gpointer user_data)
 void
 run_about_action(GSimpleAction *action, GVariant *param, GApplication *app)
 {
-        gtk_show_about_dialog(NULL,
+        GtkWindow *parent = gtk_application_get_active_window(GTK_APPLICATION(app));
+        gtk_show_about_dialog(parent,
                               "program-name",
                               "Megapixels",
                               "title",