diff options
author | lfb <lfb> | 1999-04-06 00:35:28 (GMT) |
---|---|---|
committer | lfb <lfb> | 1999-04-06 00:35:28 (GMT) |
commit | 9ae479fb5b8b7c0b174049b3890dd53c4c485d3d (patch) | |
tree | 67559923045402703f44d4f9b05fc203e6a68aa1 | |
parent | 4e21836ea60e48a77cae41d39166d8acec8f49cd (diff) | |
download | tk-9ae479fb5b8b7c0b174049b3890dd53c4c485d3d.zip tk-9ae479fb5b8b7c0b174049b3890dd53c4c485d3d.tar.gz tk-9ae479fb5b8b7c0b174049b3890dd53c4c485d3d.tar.bz2 |
Fixed Bug #1703: menubutton uses same fg and bg when disabled.
-rw-r--r-- | unix/tkUnixMenubu.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/unix/tkUnixMenubu.c b/unix/tkUnixMenubu.c index f2d0b77..e27e159 100644 --- a/unix/tkUnixMenubu.c +++ b/unix/tkUnixMenubu.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: tkUnixMenubu.c,v 1.1.4.5 1999/03/10 07:13:51 stanton Exp $ + * RCS: @(#) $Id: tkUnixMenubu.c,v 1.1.4.6 1999/04/06 00:35:28 lfb Exp $ */ #include "tkMenubutton.h" @@ -84,10 +84,10 @@ TkpDisplayMenuButton(clientData) return; } - if (mbPtr->state == STATE_DISABLED && mbPtr->disabledFg != NULL) { + if ((mbPtr->state == STATE_DISABLED) && (mbPtr->disabledFg != NULL)) { gc = mbPtr->disabledGC; border = mbPtr->normalBorder; - } else if (mbPtr->state == STATE_ACTIVE + } else if ((mbPtr->state == STATE_ACTIVE) && !Tk_StrictMotif(mbPtr->tkwin)) { gc = mbPtr->activeTextGC; border = mbPtr->activeBorder; @@ -143,8 +143,8 @@ TkpDisplayMenuButton(clientData) * foreground color, generate the stippled effect. */ - if (((mbPtr->state == STATE_DISABLED) && (mbPtr->disabledFg != NULL) ) - || (mbPtr->image != NULL)) { + if (((mbPtr->state == STATE_DISABLED) + && (mbPtr->disabledFg == NULL)) || (mbPtr->image != NULL)) { XFillRectangle(mbPtr->display, pixmap, mbPtr->disabledGC, mbPtr->inset, mbPtr->inset, (unsigned) (Tk_Width(tkwin) - 2*mbPtr->inset), |