removing outdated code

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73267 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2012-12-23 18:44:31 +00:00
parent 0ff0b78136
commit a7689c49fe

View File

@@ -1591,43 +1591,20 @@ void wxToolBar::OnPaint(wxPaintEvent& event)
int w, h; int w, h;
GetSize( &w, &h ); GetSize( &w, &h );
bool drawMetalTheme = MacGetTopLevelWindow()->GetExtraStyle() & wxFRAME_EX_METAL; wxPaintDC dc(this);
if ( UMAGetSystemVersion() < 0x1050 ) wxRect rect(0,0,w,h);
{
if ( !drawMetalTheme ) dc.GradientFillLinear( rect , wxColour( 0xCC,0xCC,0xCC ), wxColour( 0xA8,0xA8,0xA8 ) , wxSOUTH );
{ dc.SetPen( wxPen( wxColour( 0x51,0x51,0x51 ) ) );
HIThemePlacardDrawInfo info; if ( HasFlag(wxTB_LEFT) )
memset( &info, 0, sizeof(info) ); dc.DrawLine(w-1, 0, w-1, h);
info.version = 0; else if ( HasFlag(wxTB_RIGHT) )
info.state = IsEnabled() ? kThemeStateActive : kThemeStateInactive; dc.DrawLine(0, 0, 0, h);
else if ( HasFlag(wxTB_BOTTOM) )
CGContextRef cgContext = (CGContextRef) MacGetCGContextRef(); dc.DrawLine(0, 0, w, 0);
HIRect rect = CGRectMake( 0, 0, w, h ); else if ( HasFlag(wxTB_TOP) )
HIThemeDrawPlacard( &rect, &info, cgContext, kHIThemeOrientationNormal ); dc.DrawLine(0, h-1, w, h-1);
}
else
{
// leave the background as it is (striped or metal)
}
}
else
{
wxPaintDC dc(this);
wxRect rect(0,0,w,h);
dc.GradientFillLinear( rect , wxColour( 0xCC,0xCC,0xCC ), wxColour( 0xA8,0xA8,0xA8 ) , wxSOUTH );
dc.SetPen( wxPen( wxColour( 0x51,0x51,0x51 ) ) );
if ( HasFlag(wxTB_LEFT) )
dc.DrawLine(w-1, 0, w-1, h);
else if ( HasFlag(wxTB_RIGHT) )
dc.DrawLine(0, 0, 0, h);
else if ( HasFlag(wxTB_BOTTOM) )
dc.DrawLine(0, 0, w, 0);
else if ( HasFlag(wxTB_TOP) )
dc.DrawLine(0, h-1, w, h-1);
}
} }
event.Skip(); event.Skip();
} }