From: Vadim Zeitlin Date: Sun, 23 Sep 2012 22:48:16 +0000 (+0000) Subject: Correct best size computation for wxCheckBox with borders under MSW. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e380ca3cf8cca3f298ec24d31a2a673c5b3c41cd Correct best size computation for wxCheckBox with borders under MSW. As wxCheckBox can now have borders (see previous commit), we must override DoGetBestClientSize() and not DoGetBestSize() in it to take account of them. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/msw/checkbox.h b/include/wx/msw/checkbox.h index bdb5ae353f..c8416e0eae 100644 --- a/include/wx/msw/checkbox.h +++ b/include/wx/msw/checkbox.h @@ -59,7 +59,7 @@ public: virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const; protected: - virtual wxSize DoGetBestSize() const; + virtual wxSize DoGetBestClientSize() const; virtual void DoSet3StateValue(wxCheckBoxState value); virtual wxCheckBoxState DoGet3StateValue() const; diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp index 82433cd966..4912796413 100644 --- a/src/msw/checkbox.cpp +++ b/src/msw/checkbox.cpp @@ -134,7 +134,7 @@ WXDWORD wxCheckBox::MSWGetStyle(long style, WXDWORD *exstyle) const // wxCheckBox geometry // ---------------------------------------------------------------------------- -wxSize wxCheckBox::DoGetBestSize() const +wxSize wxCheckBox::DoGetBestClientSize() const { static int s_checkSize = 0;