From b4c0cf109f258ca8455f9688e24db7a0ba3aca7d Mon Sep 17 00:00:00 2001 From: sezanzeb Date: Mon, 22 Mar 2021 22:50:08 +0100 Subject: [PATCH] centering the about dialog --- data/key-mapper.glade | 5 +++++ keymapper/gui/window.py | 3 +++ 2 files changed, 8 insertions(+) diff --git a/data/key-mapper.glade b/data/key-mapper.glade index 2b638d90..3fdd17ec 100644 --- a/data/key-mapper.glade +++ b/data/key-mapper.glade @@ -215,6 +215,7 @@ To give your keys back their original mapping. Presets need to be saved before they can be applied. Don't hold down any keys while the injection starts. check-icon + none True @@ -232,6 +233,7 @@ Don't hold down any keys while the injection starts. True True copy-icon + none True @@ -249,6 +251,7 @@ Don't hold down any keys while the injection starts. True True new-icon + none True @@ -266,6 +269,7 @@ Don't hold down any keys while the injection starts. True True delete-icon + none True @@ -365,6 +369,7 @@ Don't hold down any keys while the injection starts. Save the entered name 6 save-icon + none diff --git a/keymapper/gui/window.py b/keymapper/gui/window.py index 9bbaa9bb..323187fa 100755 --- a/keymapper/gui/window.py +++ b/keymapper/gui/window.py @@ -135,6 +135,9 @@ class Window: self.confirm_delete = builder.get_object('confirm-delete') self.about = builder.get_object('about-dialog') self.about.connect('delete-event', on_close_about) + # set_position needs to be done once initially, otherwise the + # dialog is not centered when it is opened for the first time + self.about.set_position(Gtk.WindowPosition.CENTER_ON_PARENT) self.get('version-label').set_text( f'key-mapper {version} {COMMIT_HASH[:7]}'