X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/18c45cd6dc74b8c37bf6e0c920cd010d3b77135b..1215ec07d82d1b70402fe32293752f77d3d593fd:/contrib/src/fl/newbmpbtn.cpp diff --git a/contrib/src/fl/newbmpbtn.cpp b/contrib/src/fl/newbmpbtn.cpp index 9defbfe9a8..eb83eb9c62 100644 --- a/contrib/src/fl/newbmpbtn.cpp +++ b/contrib/src/fl/newbmpbtn.cpp @@ -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);