From: Dimitri Schoolwerth Date: Thu, 25 Aug 2011 23:16:44 +0000 (+0000) Subject: Fixed best sizes for wxUniv controls. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b84947323739900eb1174f507679878ea3e35fe4 Fixed best sizes for wxUniv controls. Many wxUniv controls had a way too small best size which was noticeable when running e.g. the widgets sample. Regression started in r61169 where wxWindowBase::DoGetClientBestSize() was introduced but that virtual function already existed in wxUniv's wxWindow. Removing wxUniv's wxWindow::DoGetBestSize and wxWindow::DoGetBestClientSize fixes sizing issues. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/univ/window.h b/include/wx/univ/window.h index d5aa30e4ba..1d21f3b716 100644 --- a/include/wx/univ/window.h +++ b/include/wx/univ/window.h @@ -237,12 +237,6 @@ protected: // draw the controls contents virtual void DoDraw(wxControlRenderer *renderer); - // calculate the best size for the client area of the window: default - // implementation of DoGetBestSize() uses this method and adds the border - // width to the result - virtual wxSize DoGetBestClientSize() const; - virtual wxSize DoGetBestSize() const; - // override the base class method to return the size of the window borders virtual wxSize DoGetBorderSize() const; diff --git a/src/univ/winuniv.cpp b/src/univ/winuniv.cpp index 1e6ab4bb99..9ec63e0861 100644 --- a/src/univ/winuniv.cpp +++ b/src/univ/winuniv.cpp @@ -718,16 +718,6 @@ void wxWindow::OnSize(wxSizeEvent& event) #endif } -wxSize wxWindow::DoGetBestSize() const -{ - return AdjustSize(DoGetBestClientSize()); -} - -wxSize wxWindow::DoGetBestClientSize() const -{ - return wxWindowNative::DoGetBestSize(); -} - wxSize wxWindow::DoGetBorderSize() const { return AdjustSize(wxSize(0, 0));