From 8635c0d7f9be9de36520f329efdcd09c3c61d47e Mon Sep 17 00:00:00 2001 From: ericm Date: Sat, 29 Jul 2000 01:08:54 +0000 Subject: * unix/tkUnixButton.c (TkpDisplayButton): Added bits to change the indicator color when radio-/check-buttons are disabled. This reduces the visual incongruity when a group of these controls are disabled together. --- ChangeLog | 5 +++++ unix/tkUnixButton.c | 25 +++++++++++++++++-------- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index de3c983..ac3ee7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2000-07-28 Eric Melski + * unix/tkUnixButton.c (TkpDisplayButton): Added bits to change + the indicator color when radio-/check-buttons are disabled. This + reduces the visual incongruity when a group of these controls are + disabled together. + * win/tkWinMenu.c (ReconfigureWindowsMenu): Added MF_GRAYED bit for disabled menu entries, to ensure that those which are drawn by the system are shown grayed (such as entries on menubars) [Bug: 4372]. diff --git a/unix/tkUnixButton.c b/unix/tkUnixButton.c index bad8d8a..92dc8ea 100644 --- a/unix/tkUnixButton.c +++ b/unix/tkUnixButton.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixButton.c,v 1.6 2000/05/17 21:17:22 ericm Exp $ + * RCS: @(#) $Id: tkUnixButton.c,v 1.7 2000/07/29 01:08:54 ericm Exp $ */ #include "tkButton.h" @@ -323,10 +323,15 @@ TkpDisplayButton(clientData) dim -= 2*butPtr->borderWidth; if (butPtr->flags & SELECTED) { GC gc; - - gc = Tk_3DBorderGC(tkwin, (butPtr->selectBorder != NULL) - ? butPtr->selectBorder : butPtr->normalBorder, - TK_3D_FLAT_GC); + if (butPtr->state != STATE_DISABLED && + butPtr->selectBorder != NULL) { + gc = Tk_3DBorderGC(tkwin, butPtr->selectBorder, + TK_3D_FLAT_GC); + } else { + gc = Tk_3DBorderGC(tkwin, butPtr->normalBorder, + TK_3D_FLAT_GC); + } + XFillRectangle(butPtr->display, pixmap, gc, x, y, (unsigned int) dim, (unsigned int) dim); } else { @@ -350,9 +355,13 @@ TkpDisplayButton(clientData) if (butPtr->flags & SELECTED) { GC gc; - gc = Tk_3DBorderGC(tkwin, (butPtr->selectBorder != NULL) - ? butPtr->selectBorder : butPtr->normalBorder, - TK_3D_FLAT_GC); + if (butPtr->state != STATE_DISABLED && + butPtr->selectBorder != NULL) { + gc = Tk_3DBorderGC(tkwin, butPtr->selectBorder, TK_3D_FLAT_GC); + } else { + gc = Tk_3DBorderGC(tkwin, butPtr->normalBorder, TK_3D_FLAT_GC); + } + XFillPolygon(butPtr->display, pixmap, gc, points, 4, Convex, CoordModeOrigin); } else { -- cgit v0.12