Replace DoGetBorderSize() with GetWindowBorderSize()

We accidentally ended up with two functions doing the same thing, since
DoGetBorderSize() was added in 743b426605 (Added DoGetClientBestSize()
and use it for a couple of controls in wxMSW., 2009-06-22), as we
already had GetWindowBorderSize() added even earlier in 333d70525c
(added wxWindow::GetWindowBorderSize(), 2006-11-25), so remove the
redundant non-public function and use GetWindowBorderSize() everywhere.

This does change the behaviour of GetWindowBorderSize() in wxMSW, wxGTK
and wxUniv, as it now does what DoGetBorderSize() used to do, but this
should be an improvement, as DoGetBorderSize() implementation was more
precise.
This commit is contained in:
Vadim Zeitlin
2021-07-24 20:10:24 +01:00
parent 912f4b76ac
commit 27d0e7804c
11 changed files with 19 additions and 38 deletions

View File

@@ -197,6 +197,8 @@ public:
return wxWindowNative::IsClientAreaChild(child);
}
virtual wxSize GetWindowBorderSize() const wxOVERRIDE;
protected:
// common part of all ctors
void Init();
@@ -234,9 +236,6 @@ protected:
// draw the controls contents
virtual void DoDraw(wxControlRenderer *renderer);
// override the base class method to return the size of the window borders
virtual wxSize DoGetBorderSize() const wxOVERRIDE;
// adjust the size of the window to take into account its borders
wxSize AdjustSize(const wxSize& size) const;