simplify DoSetClientSize

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2007-05-19 17:34:42 +00:00
parent ba705c09b4
commit 949ff63e2f
7 changed files with 5 additions and 90 deletions

View File

@@ -2868,25 +2868,9 @@ void wxWindowGTK::DoSetClientSize( int width, int height )
{
wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
if (m_wxwindow)
{
int dw = 0;
int dh = 0;
if (m_hasScrolling)
{
GetScrollbarWidth(m_widget, dw, dh);
}
const int border = GTK_CONTAINER(m_wxwindow)->border_width;
dw += 2 * border;
dh += 2 * border;
width += dw;
height += dh;
}
SetSize(width, height);
const wxSize size = GetSize();
const wxSize clientSize = GetClientSize();
SetSize(width + (size.x - clientSize.x), height + (size.y - clientSize.y));
}
void wxWindowGTK::DoGetClientSize( int *width, int *height ) const