From 5920453088feec13c756a593775fc5f489c6e552 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 17 Jan 2006 15:05:08 +0000 Subject: [PATCH] Improved ugly custom tool button drawing git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/fl/newbmpbtn.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/src/fl/newbmpbtn.cpp b/contrib/src/fl/newbmpbtn.cpp index 544c874346..eb83eb9c62 100644 --- a/contrib/src/fl/newbmpbtn.cpp +++ b/contrib/src/fl/newbmpbtn.cpp @@ -320,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() -- 2.45.2