const wxRect& rect,
int flags )
{
+ if ( !(flags & wxCONTROL_SELECTED) )
+ return;
+
RGBColor selColor;
- if (flags & wxCONTROL_SELECTED)
- {
- if (flags & wxCONTROL_FOCUSED)
- GetThemeBrushAsColor(kThemeBrushAlternatePrimaryHighlightColor, 32, true, &selColor);
- else
- GetThemeBrushAsColor(kThemeBrushSecondaryHighlightColor, 32, true, &selColor);
- }
+ GetThemeBrushAsColor(flags & wxCONTROL_FOCUSED
+ ? kThemeBrushAlternatePrimaryHighlightColor
+ : kThemeBrushSecondaryHighlightColor,
+ 32, true, &selColor);
- wxBrush selBrush = wxBrush( wxColour( selColor.red, selColor.green, selColor.blue ), wxSOLID );
+ wxBrush selBrush(selColor);
dc.SetPen( *wxTRANSPARENT_PEN );
dc.SetBrush( selBrush );