X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5d4b632ba3c0e5e5c43412d2d7a2b485b8fcebf2..fed628b632d8ae95efded1f6a6894573c7a76bef:/src/os2/button.cpp diff --git a/src/os2/button.cpp b/src/os2/button.cpp index dc33b17225..c9a6387c1e 100644 --- a/src/os2/button.cpp +++ b/src/os2/button.cpp @@ -33,11 +33,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos, const wxSize& size, long style, #if wxUSE_VALIDATORS -# if defined(__VISAGECPP__) - const wxValidator* validator, -# else const wxValidator& validator, -# endif #endif const wxString& name) { @@ -76,14 +72,14 @@ wxButton::~wxButton() // size management including autosizing // ---------------------------------------------------------------------------- -wxSize wxButton::DoGetBestSize() +wxSize wxButton::DoGetBestSize() const { wxString label = wxGetWindowText(GetHWND()); int wBtn; GetTextExtent(label, &wBtn, NULL); int wChar, hChar; - wxGetCharSize(GetHWND(), &wChar, &hChar, &GetFont()); + wxGetCharSize(GetHWND(), &wChar, &hChar, (wxFont*)&GetFont()); // add a margin - the button is wider than just its label wBtn += 3*wChar;