]> git.saurik.com Git - wxWidgets.git/commitdiff
Made metal theme a little faster.
authorRobert Roebling <robert@roebling.de>
Thu, 11 Apr 2002 21:56:30 +0000 (21:56 +0000)
committerRobert Roebling <robert@roebling.de>
Thu, 11 Apr 2002 21:56:30 +0000 (21:56 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/univ/themes/metal.cpp

index f3de5bd69f5aa56ecb06d3f20434f476a39434cd..56f4bdd92b406352e737d71dcd3bd2a328a6929a 100644 (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);
     }
 }