Made metal theme a little faster.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2002-04-11 21:56:30 +00:00
parent 2599ee02f1
commit a22d737782

View File

@@ -3211,20 +3211,20 @@ void wxMetalRenderer::DoDrawBackground(wxDC& dc,
const wxColour& col,
const wxRect& rect)
{
dc.SetPen(*wxTRANSPARENT_PEN);
if (col == wxTheme::Get()->GetColourScheme()->Get( wxColourScheme::CONTROL ))
{
for (int y = rect.y; y < rect.height+rect.y; y++)
{
int intens = 230 + 80 * (rect.y-y) / rect.height;
dc.SetPen( wxPen( wxColour(intens,intens,intens), 1, wxSOLID ) );
dc.DrawLine( rect.x, y, rect.x+rect.width, y );
dc.SetBrush( wxBrush( wxColour(intens,intens,intens), wxSOLID ) );
dc.DrawRectangle( rect.x, y, rect.width, 1 );
}
}
else
{
wxBrush brush(col, wxSOLID);
dc.SetBrush(brush);
dc.SetPen(*wxTRANSPARENT_PEN);
dc.DrawRectangle(rect);
}
}