From: Thomas Debesse Date: Sat, 4 Apr 2020 06:07:10 +0000 (+0200) Subject: radiant/prefs: center preferences window on main window X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6556fa57f54d525074995bfc7d495e45875eee21;p=xonotic%2Fnetradiant.git radiant/prefs: center preferences window on main window --- diff --git a/radiant/preferences.cpp b/radiant/preferences.cpp index 3794e954..3cfc420c 100644 --- a/radiant/preferences.cpp +++ b/radiant/preferences.cpp @@ -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);