- RGBColor selColor;
- if (flags & wxCONTROL_SELECTED)
- {
- if (flags & wxCONTROL_FOCUSED)
- GetThemeBrushAsColor(kThemeBrushAlternatePrimaryHighlightColor, 32, true, &selColor);
- else
- GetThemeBrushAsColor(kThemeBrushSecondaryHighlightColor, 32, true, &selColor);
- }
-
- wxBrush selBrush = wxBrush( wxColour( selColor.red, selColor.green, selColor.blue ), wxSOLID );
+ if ( !(flags & wxCONTROL_SELECTED) )
+ return;
+
+ RGBColor selColor;
+ GetThemeBrushAsColor(flags & wxCONTROL_FOCUSED
+ ? kThemeBrushAlternatePrimaryHighlightColor
+ : kThemeBrushSecondaryHighlightColor,
+ 32, true, &selColor);
+
+ wxBrush selBrush(selColor);