Improved ugly custom tool button drawing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
89a3f5c91f
commit
5920453088
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user