Use wxMessageDialog in IsOK() on GTK builds.

wxRichMessageDialog does not have the same appearance as the native
message dialogs on GTK builds so they look completely out of place.
This commit is contained in:
Wayne Stambaugh 2023-01-19 08:28:48 -05:00
parent ee3e285393
commit 774f3f9794
1 changed files with 6 additions and 2 deletions

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2007 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -392,12 +392,16 @@ bool IsOK( wxWindow* aParent, const wxString& aMessage )
int icon = wxICON_QUESTION;
#endif
#if !defined( __WXGTK__ )
wxRichMessageDialog dlg( aParent, aMessage, _( "Confirmation" ),
wxOK | wxCANCEL | wxOK_DEFAULT | wxCENTRE | icon | wxSTAY_ON_TOP );
#else
wxMessageDialog dlg( aParent, aMessage, _( "Confirmation" ),
wxOK | wxCANCEL | wxOK_DEFAULT | wxCENTRE | icon | wxSTAY_ON_TOP );
#endif
dlg.SetOKCancelLabels( _( "Yes" ), _( "No" ) );
return dlg.ShowModal() == wxID_OK;
}