Implement wxWindow::DoGetBorderSize() for all ports.
Implement DoGetBorderSize() properly for wxGTK and use the difference between the full window size and the client size for all the ports not implementing this method. The latter is incorrect in the presence of the scrollbars but is the best we can do in general. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2643,10 +2643,9 @@ void wxWindowGTK::DoGetClientSize( int *width, int *height ) const
|
||||
}
|
||||
}
|
||||
|
||||
int border_x, border_y;
|
||||
WX_PIZZA(m_wxwindow)->get_border_widths(border_x, border_y);
|
||||
w -= 2 * border_x;
|
||||
h -= 2 * border_y;
|
||||
const wxSize sizeBorders = DoGetBorderSize();
|
||||
w -= sizeBorders.x;
|
||||
h -= sizeBorders.y;
|
||||
|
||||
if (w < 0)
|
||||
w = 0;
|
||||
@@ -2658,6 +2657,17 @@ void wxWindowGTK::DoGetClientSize( int *width, int *height ) const
|
||||
if (height) *height = h;
|
||||
}
|
||||
|
||||
wxSize wxWindowGTK::DoGetBorderSize() const
|
||||
{
|
||||
if ( !m_wxwindow )
|
||||
return wxWindowBase::DoGetBorderSize();
|
||||
|
||||
int x, y;
|
||||
WX_PIZZA(m_wxwindow)->get_border_widths(x, y);
|
||||
|
||||
return 2*wxSize(x, y);
|
||||
}
|
||||
|
||||
void wxWindowGTK::DoGetPosition( int *x, int *y ) const
|
||||
{
|
||||
wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
|
||||
|
Reference in New Issue
Block a user