From d67e4ac4c2c5e8719a4704cee2025901b778793f Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 18 Apr 2010 13:15:56 +0000 Subject: [PATCH] painting background of splitter as well, fixes #11958 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/carbon/renderer.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/osx/carbon/renderer.cpp b/src/osx/carbon/renderer.cpp index c8d11afd5d..fd3b471abf 100644 --- a/src/osx/carbon/renderer.cpp +++ b/src/osx/carbon/renderer.cpp @@ -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; -- 2.45.2