added wxColour(RGBColor) ctor and use it insteaf of constructing wxColour from RGBColor manually in several places (replaces patch 1662064)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -370,16 +370,16 @@ wxRendererMac::DrawItemSelectionRect(wxWindow *win,
|
||||
const wxRect& rect,
|
||||
int flags )
|
||||
{
|
||||
RGBColor selColor;
|
||||
if (flags & wxCONTROL_SELECTED)
|
||||
{
|
||||
if (flags & wxCONTROL_FOCUSED)
|
||||
GetThemeBrushAsColor(kThemeBrushAlternatePrimaryHighlightColor, 32, true, &selColor);
|
||||
else
|
||||
GetThemeBrushAsColor(kThemeBrushSecondaryHighlightColor, 32, true, &selColor);
|
||||
}
|
||||
if ( !(flags & wxCONTROL_SELECTED) )
|
||||
return;
|
||||
|
||||
wxBrush selBrush = wxBrush( wxColour( selColor.red, selColor.green, selColor.blue ), wxSOLID );
|
||||
RGBColor selColor;
|
||||
GetThemeBrushAsColor(flags & wxCONTROL_FOCUSED
|
||||
? kThemeBrushAlternatePrimaryHighlightColor
|
||||
: kThemeBrushSecondaryHighlightColor,
|
||||
32, true, &selColor);
|
||||
|
||||
wxBrush selBrush(selColor);
|
||||
|
||||
dc.SetPen( *wxTRANSPARENT_PEN );
|
||||
dc.SetBrush( selBrush );
|
||||
|
Reference in New Issue
Block a user