X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/47e118ba9a99f27050c3fa5f19f0edd6917d5df5..75736a9c818f10e49b51506d967759fbecb4fa66:/src/gtk1/fontdlg.cpp?ds=sidebyside diff --git a/src/gtk1/fontdlg.cpp b/src/gtk1/fontdlg.cpp index b6d2f48adf..1bab264b82 100644 --- a/src/gtk1/fontdlg.cpp +++ b/src/gtk1/fontdlg.cpp @@ -127,9 +127,9 @@ bool wxFontDialog::DoCreate(wxWindow *parent) wxString m_message( _("Choose font") ); m_widget = gtk_font_selection_dialog_new( wxGTK_CONV( m_message ) ); - int x = (gdk_screen_width () - 400) / 2; - int y = (gdk_screen_height () - 400) / 2; - gtk_widget_set_uposition( m_widget, x, y ); + if (parent) + gtk_window_set_transient_for(GTK_WINDOW(m_widget), + GTK_WINDOW(parent->m_widget)); GtkFontSelectionDialog *sel = GTK_FONT_SELECTION_DIALOG(m_widget); @@ -191,4 +191,5 @@ void wxFontDialog::SetChosenFont(const char *fontname) #endif // wxUSE_FONTDLG -#endif // GPE \ No newline at end of file +#endif // GPE +