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