X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f968da288ee04ec5c0265861bb7a18182c0fb22e..9d5507f7a2701395e1d5c121bd877bb9066ee6ea:/src/mac/carbon/renderer.cpp diff --git a/src/mac/carbon/renderer.cpp b/src/mac/carbon/renderer.cpp index 5018448b4a..fb5e8d29aa 100644 --- a/src/mac/carbon/renderer.cpp +++ b/src/mac/carbon/renderer.cpp @@ -126,8 +126,9 @@ int wxRendererMac::DrawHeaderButton( wxWindow *win, else { CGContextRef cgContext; - - cgContext = (CGContextRef) dc.GetGraphicsContext()->GetNativeContext(); + wxGCDCImpl *impl = (wxGCDCImpl*) dc.GetImpl(); + + cgContext = (CGContextRef) impl->GetGraphicsContext()->GetNativeContext(); { HIThemeButtonDrawInfo drawInfo; @@ -209,7 +210,8 @@ void wxRendererMac::DrawTreeItemButton( wxWindow *win, { CGContextRef cgContext; - cgContext = (CGContextRef) dc.GetGraphicsContext()->GetNativeContext(); + wxGCDCImpl *impl = (wxGCDCImpl*) dc.GetImpl(); + cgContext = (CGContextRef) impl->GetGraphicsContext()->GetNativeContext(); HIThemeButtonDrawInfo drawInfo; HIRect labelRect; @@ -248,14 +250,15 @@ void wxRendererMac::DrawSplitterSash( wxWindow *win, if ( !dc.IsKindOf( CLASSINFO( wxPaintDC ) ) ) { - wxRect rect( splitterRect.origin.x, splitterRect.origin.y, splitterRect.size.width, splitterRect.size.height ); + wxRect rect( (int) splitterRect.origin.x, (int) splitterRect.origin.y, (int) splitterRect.size.width, + (int) splitterRect.size.height ); win->Refresh( &rect ); } else { CGContextRef cgContext; - - cgContext = (CGContextRef) dc.GetGraphicsContext()->GetNativeContext(); + wxGCDCImpl *impl = (wxGCDCImpl*) dc.GetImpl(); + cgContext = (CGContextRef) impl->GetGraphicsContext()->GetNativeContext(); HIThemeSplitterDrawInfo drawInfo; drawInfo.version = 0; @@ -273,11 +276,12 @@ wxRendererMac::DrawItemSelectionRect(wxWindow *win, { if ( !(flags & wxCONTROL_SELECTED) ) return; - - wxBrush selBrush(wxColour( wxMacCreateCGColorFromHITheme( flags & wxCONTROL_FOCUSED ? - kThemeBrushAlternatePrimaryHighlightColor - : kThemeBrushSecondaryHighlightColor ) ) , wxSOLID ); - + + wxColour col( wxMacCreateCGColorFromHITheme( (flags & wxCONTROL_FOCUSED) ? + kThemeBrushAlternatePrimaryHighlightColor + : kThemeBrushSecondaryHighlightColor ) ); + wxBrush selBrush( col ); + dc.SetPen( *wxTRANSPARENT_PEN ); dc.SetBrush( selBrush ); dc.DrawRectangle( rect ); @@ -307,8 +311,9 @@ wxRendererMac::DrawMacThemeButton(wxWindow *win, } else { + wxGCDCImpl *impl = (wxGCDCImpl*) dc.GetImpl(); CGContextRef cgContext; - cgContext = (CGContextRef) dc.GetGraphicsContext()->GetNativeContext(); + cgContext = (CGContextRef) impl->GetGraphicsContext()->GetNativeContext(); HIThemeButtonDrawInfo drawInfo; HIRect labelRect;