]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
radiant/prefs: center preferences window on main window
authorThomas Debesse <dev@illwieckz.net>
Sat, 4 Apr 2020 06:07:10 +0000 (08:07 +0200)
committerThomas Debesse <dev@illwieckz.net>
Sat, 4 Apr 2020 07:51:29 +0000 (09:51 +0200)
radiant/preferences.cpp

index 3794e954bc425b2ad43bf719ecae909c043e21bc..3cfc420c32b742fc36980cb53f8b050d9b4a4894 100644 (file)
@@ -705,8 +705,13 @@ ui::Window PrefsDlg::BuildDialog(){
        PreferencesDialog_addInterfacePreferences( makeCallbackF(Interface_constructPreferences) );
        Mouse_registerPreferencesPage();
 
+       ui::Window main_window = MainFrame_getWindow();
+
        ui::Window dialog = ui::Window(create_floating_window( RADIANT_NAME " Preferences", m_parent ));
 
+       gtk_window_set_transient_for( dialog, m_parent );
+       gtk_window_set_position( dialog, GTK_WIN_POS_CENTER_ON_PARENT );
+
        {
                auto mainvbox = ui::VBox( FALSE, 5 );
                dialog.add(mainvbox);