fixed unused param warning and code cleanup/simplification in DrawItemSelectionRect()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-04-26 18:00:52 +00:00
parent d0363d3d2d
commit 784d240848

View File

@@ -434,46 +434,30 @@ wxRendererGeneric::DrawPushButton(wxWindow *win,
} }
void void
wxRendererGeneric::DrawItemSelectionRect(wxWindow *win, wxRendererGeneric::DrawItemSelectionRect(wxWindow * WXUNUSED(win),
wxDC& dc, wxDC& dc,
const wxRect& rect, const wxRect& rect,
int flags ) int flags)
{ {
if (flags & wxCONTROL_SELECTED) wxBrush brush;
if ( flags & wxCONTROL_SELECTED )
{ {
if (flags & wxCONTROL_FOCUSED) if ( flags & wxCONTROL_FOCUSED )
{ {
wxBrush brush( brush = wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT));
wxSystemSettings::GetColour
(
wxSYS_COLOUR_HIGHLIGHT
),
wxSOLID
);
dc.SetBrush( brush );
} }
else else // !focused
{ {
wxBrush brush( brush = wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW));
wxSystemSettings::GetColour
(
wxSYS_COLOUR_BTNSHADOW
),
wxSOLID
);
dc.SetBrush( brush );
} }
} }
else else // !selected
{ {
dc.SetBrush( *wxTRANSPARENT_BRUSH ); brush = *wxTRANSPARENT_BRUSH;
} }
dc.SetBrush(brush);
if (flags & wxCONTROL_CURRENT) dc.SetPen(flags & wxCONTROL_CURRENT ? *wxBLACK_PEN : *wxTRANSPARENT_PEN);
dc.SetPen( *wxBLACK_PEN );
else
dc.SetPen( *wxTRANSPARENT_PEN );
dc.DrawRectangle( rect ); dc.DrawRectangle( rect );
} }