From b7bfa629a9f5e19392cc1e2de9d3bfd54213f1bd Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Wed, 9 May 2007 08:44:53 +0000 Subject: * Radio buttons can now be drawn as disabled under Linux. This is still a work-around imprementation until the palette issue is fixed in GFX/X11 --- gui/fpguistyle.inc | 46 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 12 deletions(-) (limited to 'gui') diff --git a/gui/fpguistyle.inc b/gui/fpguistyle.inc index a6bdecd5..af04cfed 100644 --- a/gui/fpguistyle.inc +++ b/gui/fpguistyle.inc @@ -703,22 +703,44 @@ begin InflateRect(r, -2, -2); Canvas.DrawCircle(r); - SetUIColor(Canvas, cl3DDkShadow); + if cbIsEnabled in Flags then + SetUIColor(Canvas, cl3DDkShadow) + else + SetUIColor(Canvas, cl3DShadow); InflateRect(r, 1, 1); Canvas.DrawCircle(r); - if cbIsChecked in Flags then + if cbIsEnabled in Flags then begin - SetUIColor(Canvas, clNavy); - InflateRect(r, -3, -3); - Canvas.DrawCircle(r); - InflateRect(r, -1, -1); - Canvas.FillRect(r); - InflateRect(r, 1, 1); - SetUIColor(Canvas, clSkyBlue); - InflateRect(r, -2, -2); - OffsetRect(r, -1, -1); - Canvas.FillRect(r); + if cbIsChecked in Flags then + begin + SetUIColor(Canvas, clNavy); + InflateRect(r, -3, -3); + Canvas.DrawCircle(r); + InflateRect(r, -1, -1); + Canvas.FillRect(r); + InflateRect(r, 1, 1); + SetUIColor(Canvas, clSkyBlue); + InflateRect(r, -2, -2); + OffsetRect(r, -1, -1); + Canvas.FillRect(r); + end; + end + else + begin + if cbIsChecked in Flags then + begin + SetUIColor(Canvas, cl3DShadow); + InflateRect(r, -3, -3); + Canvas.DrawCircle(r); + InflateRect(r, -1, -1); + Canvas.FillRect(r); + InflateRect(r, 1, 1); + SetUIColor(Canvas, clLtGray); + InflateRect(r, -2, -2); + OffsetRect(r, -1, -1); + Canvas.FillRect(r); + end; end; {$ENDIF} -- cgit v1.2.3-70-g09d2