Index: gui/src/TGButton.cxx =================================================================== RCS file: /user/cvs/root/gui/src/TGButton.cxx,v retrieving revision 1.62 diff -u -u -r1.62 TGButton.cxx --- gui/src/TGButton.cxx 17 Nov 2005 19:09:28 -0000 1.62 +++ gui/src/TGButton.cxx 22 Nov 2006 14:39:41 -0000 @@ -1,4 +1,4 @@ -// @(#)root/gui:$Name: $:$Id: TGButton.cxx,v 1.62 2005/11/17 19:09:28 rdm Exp $ +// @(#)root/gui:$Name: v5-08-00b $:$Id: TGButton.cxx,v 1.62 2005/11/17 19:09:28 rdm Exp $ // Author: Fons Rademakers 06/01/98 /************************************************************************* @@ -1012,7 +1012,19 @@ gVirtualX->DrawLine(fId, GetBckgndGC()(), 2, y0+cw-2, cw-2, y0+cw-2); gVirtualX->DrawLine(fId, GetBckgndGC()(), cw-2, y0+2, cw-2, y0+cw-2); - gVirtualX->FillRectangle(fId, GetWhiteGC()(), 2, y0+2, cw-4, cw-4); + x = 20; + y = y0; + + int max_ascent, max_descent; + gVirtualX->GetFontProperties(fFontStruct, max_ascent, max_descent); + if (fState == kButtonDisabled) { + fLabel->Draw(fId, GetHilightGC()(), x+1, y+1 + max_ascent); + fLabel->Draw(fId, GetShadowGC()(), x, y + max_ascent); + gVirtualX->FillRectangle(fId, GetBckgndGC()(), 2, y0+2, cw-4, cw-4); + } else { + fLabel->Draw(fId, fNormGC, x, y + max_ascent); + gVirtualX->FillRectangle(fId, GetWhiteGC()(), 2, y0+2, cw-4, cw-4); + } if (fState == kButtonDown) { Segment_t seg[6]; @@ -1030,17 +1042,6 @@ gVirtualX->DrawSegments(fId, GetBlackGC()(), seg, 6); } - x = 20; - y = y0; - - int max_ascent, max_descent; - gVirtualX->GetFontProperties(fFontStruct, max_ascent, max_descent); - if (fState == kButtonDisabled) { - fLabel->Draw(fId, GetHilightGC()(), x+1, y+1 + max_ascent); - fLabel->Draw(fId, GetShadowGC()(), x, y + max_ascent); - } else { - fLabel->Draw(fId, fNormGC, x, y + max_ascent); - } } //______________________________________________________________________________