]> git.saurik.com Git - wxWidgets.git/commitdiff
painting background of splitter as well, fixes #11958
authorStefan Csomor <csomor@advancedconcepts.ch>
Sun, 18 Apr 2010 13:15:56 +0000 (13:15 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sun, 18 Apr 2010 13:15:56 +0000 (13:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/carbon/renderer.cpp

index c8d11afd5dd3a2f0603108e96d1af4ab25f1402e..fd3b471abf6a84cff35a0416890fcb45e885539b 100644 (file)
@@ -284,14 +284,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;