HIRect headerRect = CGRectMake( x, y, w, h );
if ( !dc.IsKindOf( CLASSINFO( wxPaintDC ) ) )
{
- Rect r =
- {
- (short) headerRect.origin.y, (short) headerRect.origin.x,
- (short) (headerRect.origin.y + headerRect.size.height),
- (short) (headerRect.origin.x + headerRect.size.width)
- };
-
- RgnHandle updateRgn = NewRgn();
- RectRgn( updateRgn, &r );
- HIViewSetNeedsDisplayInRegion( (HIViewRef) win->GetHandle(), updateRgn, true );
- DisposeRgn( updateRgn );
+ win->Refresh( &rect );
}
else
{
HIRect headerRect = CGRectMake( x, y, w, h );
if ( !dc.IsKindOf( CLASSINFO( wxPaintDC ) ) )
{
- Rect r =
- {
- (short) headerRect.origin.y, (short) headerRect.origin.x,
- (short) (headerRect.origin.y + headerRect.size.height),
- (short) (headerRect.origin.x + headerRect.size.width)
- };
-
- RgnHandle updateRgn = NewRgn();
- RectRgn( updateRgn, &r );
- HIViewSetNeedsDisplayInRegion( (HIViewRef) win->GetHandle(), updateRgn, true );
- DisposeRgn( updateRgn );
+ win->Refresh( &rect );
}
else
{
if ( !dc.IsKindOf( CLASSINFO( wxPaintDC ) ) )
{
- Rect r =
- {
- (short) splitterRect.origin.y,
- (short) splitterRect.origin.x,
- (short) (splitterRect.origin.y + splitterRect.size.height),
- (short) (splitterRect.origin.x + splitterRect.size.width)
- };
-
- RgnHandle updateRgn = NewRgn();
- RectRgn( updateRgn, &r );
- HIViewSetNeedsDisplayInRegion( (HIViewRef) win->GetHandle(), updateRgn, true );
- DisposeRgn( updateRgn );
- }
+ wxRect rect( splitterRect.origin.x, splitterRect.origin.y, splitterRect.size.width, splitterRect.size.height );
+ win->Refresh( &rect );
+ }
else
{
CGContextRef cgContext;
if ( !(flags & wxCONTROL_SELECTED) )
return;
- if (flags & wxCONTROL_FOCUSED)
- {
- if (!IsControlActive( (ControlRef)win->GetHandle() ))
- flags = wxCONTROL_SELECTED;
- }
-
- RGBColor selColor;
- GetThemeBrushAsColor(flags & wxCONTROL_FOCUSED
- ? kThemeBrushAlternatePrimaryHighlightColor
- : kThemeBrushSecondaryHighlightColor,
- 32, true, &selColor);
-
- wxBrush selBrush(selColor);
+ wxBrush selBrush(wxColour( wxMacCreateCGColorFromHITheme( flags & wxCONTROL_FOCUSED ?
+ kThemeBrushAlternatePrimaryHighlightColor
+ : kThemeBrushSecondaryHighlightColor ) ) , wxSOLID );
dc.SetPen( *wxTRANSPARENT_PEN );
dc.SetBrush( selBrush );
HIRect headerRect = CGRectMake( x, y, w, h );
if ( !dc.IsKindOf( CLASSINFO( wxPaintDC ) ) )
{
- Rect r =
- {
- (short) headerRect.origin.y, (short) headerRect.origin.x,
- (short) (headerRect.origin.y + headerRect.size.height),
- (short) (headerRect.origin.x + headerRect.size.width)
- };
-
- RgnHandle updateRgn = NewRgn();
- RectRgn( updateRgn, &r );
- HIViewSetNeedsDisplayInRegion( (HIViewRef) win->GetHandle(), updateRgn, true );
- DisposeRgn( updateRgn );
+ win->Refresh( &rect );
}
else
{