wxButtons no longer leave junk on dialogs when moved.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -806,14 +806,29 @@ void wxWindowMac::Refresh(bool eraseBack, const wxRect *rect)
|
|||||||
if ( MacGetTopLevelWindow() == NULL )
|
if ( MacGetTopLevelWindow() == NULL )
|
||||||
return ;
|
return ;
|
||||||
|
|
||||||
wxPoint client ;
|
wxPoint client = GetClientAreaOrigin();
|
||||||
client = GetClientAreaOrigin( ) ;
|
int x1 = -client.x;
|
||||||
Rect clientrect = { -client.y , -client.x , m_height - client.y , m_width - client.x} ;
|
int y1 = -client.y;
|
||||||
|
int x2 = m_width - client.x;
|
||||||
|
int y2 = m_height - client.y;
|
||||||
|
|
||||||
|
if (IsKindOf( CLASSINFO(wxButton)))
|
||||||
|
{
|
||||||
|
// buttons have an "aura"
|
||||||
|
y1 -= 5;
|
||||||
|
x1 -= 5;
|
||||||
|
y2 += 5;
|
||||||
|
x2 += 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
Rect clientrect = { y1, x1, y2, x2 };
|
||||||
|
|
||||||
if ( rect )
|
if ( rect )
|
||||||
{
|
{
|
||||||
Rect r = { rect->y , rect->x , rect->y + rect->height , rect->x + rect->width } ;
|
Rect r = { rect->y , rect->x , rect->y + rect->height , rect->x + rect->width } ;
|
||||||
SectRect( &clientrect , &r , &clientrect ) ;
|
SectRect( &clientrect , &r , &clientrect ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !EmptyRect( &clientrect ) )
|
if ( !EmptyRect( &clientrect ) )
|
||||||
{
|
{
|
||||||
int top = 0 , left = 0 ;
|
int top = 0 , left = 0 ;
|
||||||
|
@@ -806,14 +806,29 @@ void wxWindowMac::Refresh(bool eraseBack, const wxRect *rect)
|
|||||||
if ( MacGetTopLevelWindow() == NULL )
|
if ( MacGetTopLevelWindow() == NULL )
|
||||||
return ;
|
return ;
|
||||||
|
|
||||||
wxPoint client ;
|
wxPoint client = GetClientAreaOrigin();
|
||||||
client = GetClientAreaOrigin( ) ;
|
int x1 = -client.x;
|
||||||
Rect clientrect = { -client.y , -client.x , m_height - client.y , m_width - client.x} ;
|
int y1 = -client.y;
|
||||||
|
int x2 = m_width - client.x;
|
||||||
|
int y2 = m_height - client.y;
|
||||||
|
|
||||||
|
if (IsKindOf( CLASSINFO(wxButton)))
|
||||||
|
{
|
||||||
|
// buttons have an "aura"
|
||||||
|
y1 -= 5;
|
||||||
|
x1 -= 5;
|
||||||
|
y2 += 5;
|
||||||
|
x2 += 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
Rect clientrect = { y1, x1, y2, x2 };
|
||||||
|
|
||||||
if ( rect )
|
if ( rect )
|
||||||
{
|
{
|
||||||
Rect r = { rect->y , rect->x , rect->y + rect->height , rect->x + rect->width } ;
|
Rect r = { rect->y , rect->x , rect->y + rect->height , rect->x + rect->width } ;
|
||||||
SectRect( &clientrect , &r , &clientrect ) ;
|
SectRect( &clientrect , &r , &clientrect ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !EmptyRect( &clientrect ) )
|
if ( !EmptyRect( &clientrect ) )
|
||||||
{
|
{
|
||||||
int top = 0 , left = 0 ;
|
int top = 0 , left = 0 ;
|
||||||
|
Reference in New Issue
Block a user