summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorericm <ericm>2000-07-29 01:08:54 (GMT)
committerericm <ericm>2000-07-29 01:08:54 (GMT)
commit8635c0d7f9be9de36520f329efdcd09c3c61d47e (patch)
treed73e8112794686e6024f95a8c2c9767f28160867
parente16ace7494c18ca956b24fad670adf43fb0feba3 (diff)
downloadtk-8635c0d7f9be9de36520f329efdcd09c3c61d47e.zip
tk-8635c0d7f9be9de36520f329efdcd09c3c61d47e.tar.gz
tk-8635c0d7f9be9de36520f329efdcd09c3c61d47e.tar.bz2
* 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.
-rw-r--r--ChangeLog5
-rw-r--r--unix/tkUnixButton.c25
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 <ericm@ajubasolutions.com>
+ * 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 {