Replace DoGetBorderSize() with GetWindowBorderSize()
We accidentally ended up with two functions doing the same thing, since DoGetBorderSize() was added in743b426605
(Added DoGetClientBestSize() and use it for a couple of controls in wxMSW., 2009-06-22), as we already had GetWindowBorderSize() added even earlier in333d70525c
(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:
@@ -4021,7 +4021,7 @@ void wxWindowGTK::DoGetClientSize( int *width, int *height ) const
|
||||
}
|
||||
}
|
||||
|
||||
const wxSize sizeBorders = DoGetBorderSize();
|
||||
const wxSize sizeBorders = GetWindowBorderSize();
|
||||
w -= sizeBorders.x;
|
||||
h -= sizeBorders.y;
|
||||
|
||||
@@ -4035,10 +4035,10 @@ void wxWindowGTK::DoGetClientSize( int *width, int *height ) const
|
||||
if (height) *height = h;
|
||||
}
|
||||
|
||||
wxSize wxWindowGTK::DoGetBorderSize() const
|
||||
wxSize wxWindowGTK::GetWindowBorderSize() const
|
||||
{
|
||||
if ( !m_wxwindow )
|
||||
return wxWindowBase::DoGetBorderSize();
|
||||
return wxWindowBase::GetWindowBorderSize();
|
||||
|
||||
GtkBorder border;
|
||||
WX_PIZZA(m_wxwindow)->get_border(border);
|
||||
|
Reference in New Issue
Block a user