From 006579996580efb6da2a61bbb0a2141a04fc45d1 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Mon, 29 Jun 2020 20:02:38 +0200 Subject: [PATCH] Fix calculating the size of wxSpinCtrl numeric box under wxOSX Since 8189ce89ed (Improve wxTextCtrl::DoGetSizeFromTextSize() in wxOSX, 2020-05-28) GetSizeFromTextSize() is fully functional under wxOSX so we can revert 39d586421b (Don't call GetSizeFromText() under wxOSX, 2020-05-21) and use GetSizeFromText() in calculating text box size. Closes #18766. --- src/generic/spinctlg.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/generic/spinctlg.cpp b/src/generic/spinctlg.cpp index 848a8bb8f7..915dcf9076 100644 --- a/src/generic/spinctlg.cpp +++ b/src/generic/spinctlg.cpp @@ -117,9 +117,6 @@ public: event.Skip(); } -#if defined(__WXMSW__) || defined(__WXGTK__) - // GetSizeFromTextSize() is not implemented in wxOSX - // so GetSizeFromText() cannot be used for size calculations. virtual wxSize DoGetBestSize() const wxOVERRIDE { wxString minVal = m_spin->DoValueToText(m_spin->m_min); @@ -129,7 +126,6 @@ public: return wxSize(wxMax(minValSize.x, maxValSize.x), wxMax(minValSize.y, maxValSize.y)); } -#endif // __WXMSW || __WXGTK__ wxSpinCtrlGenericBase *m_spin;