From 774f3f9794fde60f3b5aa81ab90b8af6d5beba66 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Thu, 19 Jan 2023 08:28:48 -0500 Subject: [PATCH] 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. --- common/confirm.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/confirm.cpp b/common/confirm.cpp index c6526526f5..8f5874cb03 100644 --- a/common/confirm.cpp +++ b/common/confirm.cpp @@ -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; }