]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/renderer.cpp
no real change: just rename "near" into "onNearPart" (MSVC doesn't like 'near' as...
[wxWidgets.git] / src / osx / carbon / renderer.cpp
index c8d11afd5dd3a2f0603108e96d1af4ab25f1402e..cf8c734dc33dfdc6eebb9fdd91ac5a115dd4892c 100644 (file)
@@ -12,6 +12,8 @@
 // for compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
+#if wxOSX_USE_COCOA_OR_CARBON
+
 #ifdef __BORLANDC__
     #pragma hdrstop
 #endif
@@ -284,14 +286,27 @@ void wxRendererMac::DrawSplitterSash( wxWindow *win,
     {
         wxRect rect( (int) splitterRect.origin.x, (int) splitterRect.origin.y, (int) splitterRect.size.width,
                      (int) splitterRect.size.height );
-        win->Refresh( &rect );
-   }
+        win->RefreshRect( rect );
+    }
     else
     {
         CGContextRef cgContext;
         wxGCDCImpl *impl = (wxGCDCImpl*) dc.GetImpl();
         cgContext = (CGContextRef) impl->GetGraphicsContext()->GetNativeContext();
 
+        HIThemeBackgroundDrawInfo bgdrawInfo;
+        bgdrawInfo.version = 0;
+        bgdrawInfo.state = kThemeStateActive;
+        bgdrawInfo.kind = hasMetal ? kThemeBackgroundMetal : kThemeBackgroundPlacard;
+
+        if ( hasMetal )
+            HIThemeDrawBackground(&splitterRect, &bgdrawInfo, cgContext, kHIThemeOrientationNormal);
+        else 
+        {
+            CGContextSetFillColorWithColor(cgContext,win->GetBackgroundColour().GetCGColor());
+            CGContextFillRect(cgContext,splitterRect);
+        }
+        
         HIThemeSplitterDrawInfo drawInfo;
         drawInfo.version = 0;
         drawInfo.state = kThemeStateActive;
@@ -793,3 +808,5 @@ void wxRendererMac::DrawTitleBarBitmap(wxWindow *win,
 }
 
 #endif // wxHAS_DRAW_TITLE_BAR_BITMAP
+
+#endif
\ No newline at end of file