diff options
author | hobbs <hobbs> | 2003-04-25 20:11:26 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2003-04-25 20:11:26 (GMT) |
commit | 165b227f9936ee73db655e68bb22b4ddf1ad3065 (patch) | |
tree | 933a5b180ed9483fb0a8edd6d90eead469be3e60 /unix/tkUnixButton.c | |
parent | a46adb61bb407f5fc6a7ce81c4b7e2cfe2a2f96d (diff) | |
download | tk-165b227f9936ee73db655e68bb22b4ddf1ad3065.zip tk-165b227f9936ee73db655e68bb22b4ddf1ad3065.tar.gz tk-165b227f9936ee73db655e68bb22b4ddf1ad3065.tar.bz2 |
* unix/tkUnixButton.c (TkpDisplayButton): Use the normalTextGc when
* win/tkWinButton.c (TkpDisplayButton): displaying disabled text
that have images, as they get a gray50 stipple as well and the
disabledGc is not set up correctly for font drawing. [Bug #477740]
Diffstat (limited to 'unix/tkUnixButton.c')
-rw-r--r-- | unix/tkUnixButton.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/unix/tkUnixButton.c b/unix/tkUnixButton.c index c9d8448..24aef95 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.11 2003/02/25 01:39:57 hobbs Exp $ + * RCS: @(#) $Id: tkUnixButton.c,v 1.11.2.1 2003/04/25 20:11:30 hobbs Exp $ */ #include "tkButton.h" @@ -266,9 +266,13 @@ TkpDisplayButton(clientData) XSetClipOrigin(butPtr->display, gc, 0, 0); } - Tk_DrawTextLayout(butPtr->display, pixmap, gc, butPtr->textLayout, - x + textXOffset, y + textYOffset, 0, -1); - Tk_UnderlineTextLayout(butPtr->display, pixmap, gc, + /* + * Use normalTextGC in this case since we have both text and image, + * the whole button will later be stippled 50% grey. + */ + Tk_DrawTextLayout(butPtr->display, pixmap, butPtr->normalTextGC, + butPtr->textLayout, x + textXOffset, y + textYOffset, 0, -1); + Tk_UnderlineTextLayout(butPtr->display, pixmap, butPtr->normalTextGC, butPtr->textLayout, x + textXOffset, y + textYOffset, butPtr->underline); y += fullHeight/2; |