]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/fl/newbmpbtn.cpp
Typo correction
[wxWidgets.git] / contrib / src / fl / newbmpbtn.cpp
index 9defbfe9a8056135c5f3824e7a0dfc160a6cecd5..eb83eb9c6219ec78b54cb8da09cc5312c16b585c 100644 (file)
@@ -9,10 +9,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
-    #pragma implementation "newbmpbtn.h"
-#endif
-
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
@@ -324,20 +320,21 @@ void wxNewBitmapButton::DrawShade( int outerLevel,
                                    wxPen& lowerRightSidePen )
 {
     wxBitmap* pBmp = GetStateLabel();
-
     int x = mMarginX - (outerLevel + 2);
     int y = mMarginY - (outerLevel + 2);
-
     int height = pBmp->GetHeight() + (outerLevel + 2)*2 - 1;
     int width  = pBmp->GetWidth()  + (outerLevel + 2)*2 - 1;
-
     dc.SetPen( upperLeftSidePen );
     dc.DrawLine( x,y, x + width, y  );
     dc.DrawLine( x,y, x, y + height );
+    dc.DrawLine( x,y+1, x + width , y +1 );  // top
+    dc.DrawLine( x+1,y, x+1, y + height );  // left
 
     dc.SetPen( lowerRightSidePen );
     dc.DrawLine( x + width, y, x + width, y + height + 1  );
     dc.DrawLine( x, y + height, x + width, y + height );
+    dc.DrawLine( x + width-1, y+1, x + width-1, y + height +1  );  // right
+    dc.DrawLine( x +1, y + height-1, x + width, y + height-1 );  // bottom
 }
 
 void wxNewBitmapButton::DestroyLabels()
@@ -513,7 +510,8 @@ void wxNewBitmapButton::RenderLabelImage( wxBitmap*& destBmp, wxBitmap* srcBmp,
 #ifdef __WXMSW__ // This is currently MSW specific
         gray_out_image_on_dc( destDc, destDim.x, destDim.y );
 #else
-        wxBrush checkerBrush( wxBitmap( (const char*)_gDisableImage,8,8) );
+        wxBitmap bmp( (const char*)_gDisableImage,8,8);
+        wxBrush checkerBrush(bmp);
         checkerBrush.SetColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
         destDc.SetBrush( checkerBrush );
         destDc.DrawRectangle( imgPos.x, imgPos.y, srcBmp->GetWidth()+1, srcBmp->GetHeight()+1);