simplify default border code in DoSetSize
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2640,11 +2640,6 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags
|
|||||||
|
|
||||||
if (m_parent->m_wxwindow)
|
if (m_parent->m_wxwindow)
|
||||||
{
|
{
|
||||||
int left_border = 0;
|
|
||||||
int right_border = 0;
|
|
||||||
int top_border = 0;
|
|
||||||
int bottom_border = 0;
|
|
||||||
|
|
||||||
/* the default button has a border around it */
|
/* the default button has a border around it */
|
||||||
if (gtk_widget_get_can_default(m_widget))
|
if (gtk_widget_get_can_default(m_widget))
|
||||||
{
|
{
|
||||||
@@ -2652,18 +2647,15 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags
|
|||||||
gtk_widget_style_get( m_widget, "default_border", &default_border, NULL );
|
gtk_widget_style_get( m_widget, "default_border", &default_border, NULL );
|
||||||
if (default_border)
|
if (default_border)
|
||||||
{
|
{
|
||||||
left_border += default_border->left;
|
x -= default_border->left;
|
||||||
right_border += default_border->right;
|
y -= default_border->top;
|
||||||
top_border += default_border->top;
|
width += default_border->left + default_border->right;
|
||||||
bottom_border += default_border->bottom;
|
height += default_border->top + default_border->bottom;
|
||||||
gtk_border_free( default_border );
|
gtk_border_free( default_border );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DoMoveWindow( m_x - left_border,
|
DoMoveWindow(x, y, width, height);
|
||||||
m_y - top_border,
|
|
||||||
m_width+left_border+right_border,
|
|
||||||
m_height+top_border+bottom_border );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sizeChange)
|
if (sizeChange)
|
||||||
|
Reference in New Issue
Block a user