Remove argument to wxButton::GetDefaultSize on wxGTK-3.0.x

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13181
This commit is contained in:
J RB
2022-12-16 22:40:37 +00:00
committed by Jon Evans
parent 059a134dbe
commit 5f0d26cbe2
2 changed files with 12 additions and 2 deletions
+6 -1
View File
@@ -30,6 +30,7 @@
#include <wx/menu.h>
#include <wx/renderer.h>
#include <wx/settings.h>
#include <wx/version.h>
#include <kiplatform/ui.h>
SPLIT_BUTTON::SPLIT_BUTTON( wxWindow* aParent, wxWindowID aId, const wxString& aLabel,
@@ -39,7 +40,11 @@ SPLIT_BUTTON::SPLIT_BUTTON( wxWindow* aParent, wxWindowID aId, const wxString& a
{
if( aSize == wxDefaultSize )
{
wxSize defaultSize = wxButton::GetDefaultSize( aParent );
#if wxCHECK_VERSION( 3, 1, 3 )
wxSize defaultSize = wxButton::GetDefaultSize( aParent );
#else
wxSize defaultSize = wxButton::GetDefaultSize();
#endif
wxSize textSize = GetTextExtent( m_label );
SetMinSize( wxSize( std::max( textSize.GetWidth(), defaultSize.GetWidth() + 1 ),