Applied patch [ 1096612 ] FL: fix close button on wxGTK

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2005-02-10 16:35:12 +00:00
parent 92850d6b2f
commit 8f3516688b
2 changed files with 2 additions and 34 deletions

View File

@ -25,7 +25,7 @@
#define BTN_BOX_HEIGHT 12 #define BTN_BOX_HEIGHT 12
#define BTN_BOX_WIDTH 12 #define BTN_BOX_WIDTH 12
#define BTN_X_WIEGHT 2 #define BTN_X_WEIGHT 2
class WXDLLIMPEXP_FL cbMiniButton; class WXDLLIMPEXP_FL cbMiniButton;

View File

@ -869,35 +869,6 @@ void cbMiniButton::Reset()
void cbCloseBox::Draw( wxDC& dc ) void cbCloseBox::Draw( wxDC& dc )
{ {
#if defined(__WXGTK__) || defined(__WXX11__)
cbMiniButton::Draw( dc );
wxPen pen( wxColour( 64,64,64 ) ,1, wxSOLID );
dc.SetPen( pen );
int width = BTN_BOX_WIDTH - 7;
int xOfs = (mPressed) ? 4 : 3;
int yOfs = (mPressed) ? 4 : 3;
int one = 1;
for( int i = 0; i != BTN_X_WIEGHT; ++i )
{
dc.DrawLine( mPos.x + xOfs + i - one,
mPos.y + yOfs - one,
mPos.x + xOfs + i + width,
mPos.y + yOfs + width + one);
dc.DrawLine( mPos.x + xOfs + i + width ,
mPos.y + yOfs - one - one,
mPos.x + xOfs + i - one,
mPos.y + yOfs + width );
}
#else
cbMiniButton::Draw( dc ); cbMiniButton::Draw( dc );
dc.SetPen( *wxBLACK_PEN ); dc.SetPen( *wxBLACK_PEN );
@ -907,7 +878,7 @@ void cbCloseBox::Draw( wxDC& dc )
int xOfs = (mPressed) ? 4 : 3; int xOfs = (mPressed) ? 4 : 3;
int yOfs = (mPressed) ? 4 : 3; int yOfs = (mPressed) ? 4 : 3;
for( int i = 0; i != BTN_X_WIEGHT; ++i ) for( int i = 0; i != BTN_X_WEIGHT; ++i )
{ {
dc.DrawLine( mPos.x + xOfs + i, dc.DrawLine( mPos.x + xOfs + i,
mPos.y + yOfs, mPos.y + yOfs,
@ -919,9 +890,6 @@ void cbCloseBox::Draw( wxDC& dc )
mPos.x + xOfs + i - 1, mPos.x + xOfs + i - 1,
mPos.y + yOfs + width ); mPos.y + yOfs + width );
} }
#endif
} }
/***** Implementation fro class cbCollapseBox *****/ /***** Implementation fro class cbCollapseBox *****/