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:
@@ -92,7 +92,7 @@ public:
|
|||||||
wxDC& dc,
|
wxDC& dc,
|
||||||
const wxRect& rect,
|
const wxRect& rect,
|
||||||
int flags = 0);
|
int flags = 0);
|
||||||
|
|
||||||
virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win);
|
virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win);
|
||||||
|
|
||||||
virtual wxRendererVersion GetVersion() const
|
virtual wxRendererVersion GetVersion() const
|
||||||
@@ -401,7 +401,7 @@ wxRendererGeneric::DrawDropArrow(wxWindow *win,
|
|||||||
dc.DrawPolygon(WXSIZEOF(pt), pt, rect.x, rect.y);
|
dc.DrawPolygon(WXSIZEOF(pt), pt, rect.x, rect.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
wxRendererGeneric::DrawCheckButton(wxWindow *WXUNUSED(win),
|
wxRendererGeneric::DrawCheckButton(wxWindow *WXUNUSED(win),
|
||||||
wxDC& dc,
|
wxDC& dc,
|
||||||
const wxRect& rect,
|
const wxRect& rect,
|
||||||
@@ -433,49 +433,33 @@ wxRendererGeneric::DrawPushButton(wxWindow *win,
|
|||||||
dc.DrawRectangle(rect);
|
dc.DrawRectangle(rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
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.DrawRectangle( rect );
|
||||||
dc.SetPen( *wxTRANSPARENT_PEN );
|
|
||||||
|
|
||||||
dc.DrawRectangle( rect );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user