corrected GetPosition and extended erasing to include the entire update rgn passed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1142,9 +1142,10 @@ void wxWindowMac::DoGetPosition(int *x, int *y) const
|
|||||||
wxWindow *parent = GetParent();
|
wxWindow *parent = GetParent();
|
||||||
if ( parent )
|
if ( parent )
|
||||||
{
|
{
|
||||||
// we must first adjust it twice, as otherwise it gets lost by the clientareaorigin fix
|
// we must first adjust it to be in window coordinates of the parent, as otherwise it gets lost by the clientareaorigin fix
|
||||||
x1 += 2 * parent->MacGetLeftBorderSize() ;
|
x1 += parent->MacGetLeftBorderSize() ;
|
||||||
y1 += 2 * parent->MacGetTopBorderSize() ;
|
y1 += parent->MacGetTopBorderSize() ;
|
||||||
|
// and now to client coordinates
|
||||||
wxPoint pt(parent->GetClientAreaOrigin());
|
wxPoint pt(parent->GetClientAreaOrigin());
|
||||||
x1 -= pt.x ;
|
x1 -= pt.x ;
|
||||||
y1 -= pt.y ;
|
y1 -= pt.y ;
|
||||||
@@ -2261,9 +2262,16 @@ void wxWindowMac::MacPaintBorders( int left , int top )
|
|||||||
}
|
}
|
||||||
else if (HasFlag(wxSIMPLE_BORDER))
|
else if (HasFlag(wxSIMPLE_BORDER))
|
||||||
{
|
{
|
||||||
|
#if wxMAC_USE_THEME_BORDER
|
||||||
|
SInt32 border = 0 ;
|
||||||
|
GetThemeMetric( kThemeMetricListBoxFrameOutset , &border ) ;
|
||||||
|
InsetRect( &rect , border , border );
|
||||||
|
DrawThemeListBoxFrame(&rect,IsEnabled() ? kThemeStateActive : kThemeStateInactive) ;
|
||||||
|
#else
|
||||||
Rect rect = { top , left , h + top , w + left } ;
|
Rect rect = { top , left , h + top , w + left } ;
|
||||||
RGBForeColor( &darkShadow ) ;
|
RGBForeColor( &darkShadow ) ;
|
||||||
FrameRect( &rect ) ;
|
FrameRect( &rect ) ;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2697,14 +2705,14 @@ bool wxWindowMac::MacDoRedraw( WXHRGN updatergnr , long time )
|
|||||||
SetRectRgn( newupdate , origin.x , origin.y , origin.x + point.x , origin.y+point.y ) ;
|
SetRectRgn( newupdate , origin.x , origin.y , origin.x + point.x , origin.y+point.y ) ;
|
||||||
SectRgn( newupdate , updatergn , newupdate ) ;
|
SectRgn( newupdate , updatergn , newupdate ) ;
|
||||||
|
|
||||||
if (!EmptyRgn(newupdate))
|
// if (!EmptyRgn(newupdate))
|
||||||
{
|
// {
|
||||||
wxWindowDC dc(this);
|
wxWindowDC dc(this);
|
||||||
dc.SetClippingRegion(wxRegion(newupdate));
|
dc.SetClippingRegion(wxRegion(updatergn));
|
||||||
wxEraseEvent eevent( GetId(), &dc );
|
wxEraseEvent eevent( GetId(), &dc );
|
||||||
eevent.SetEventObject( this );
|
eevent.SetEventObject( this );
|
||||||
GetEventHandler()->ProcessEvent( eevent );
|
GetEventHandler()->ProcessEvent( eevent );
|
||||||
}
|
// }
|
||||||
|
|
||||||
// calculate a client-origin version of the update rgn and set m_updateRegion to that
|
// calculate a client-origin version of the update rgn and set m_updateRegion to that
|
||||||
OffsetRgn( newupdate , -origin.x , -origin.y ) ;
|
OffsetRgn( newupdate , -origin.x , -origin.y ) ;
|
||||||
|
Reference in New Issue
Block a user