X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f38374d0d7aa865e9bbe8ee61b75b94ffcdfb220..a05da1b6827f40c0beb97225e9861356343e196b:/src/os2/button.cpp?ds=sidebyside diff --git a/src/os2/button.cpp b/src/os2/button.cpp index c4f5ac0f10..c9a6387c1e 100644 --- a/src/os2/button.cpp +++ b/src/os2/button.cpp @@ -72,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;