summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2003-04-25 20:03:37 (GMT)
committerhobbs <hobbs@noemail.net>2003-04-25 20:03:37 (GMT)
commit6d0f80f42b127461746da9bd8d8cd9486fa67cb0 (patch)
tree63c8cdd8510995594abd104d618792fb2b428a6d /unix
parent007f59e956aee5d38d14f99b91f855eb4bb26d78 (diff)
downloadtk-6d0f80f42b127461746da9bd8d8cd9486fa67cb0.zip
tk-6d0f80f42b127461746da9bd8d8cd9486fa67cb0.tar.gz
tk-6d0f80f42b127461746da9bd8d8cd9486fa67cb0.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] FossilOrigin-Name: 12fc533501c0ad91469c0c4983d0fc54a08874ca
Diffstat (limited to 'unix')
-rw-r--r--unix/tkUnixButton.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/unix/tkUnixButton.c b/unix/tkUnixButton.c
index c9d8448..ae2feae 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.12 2003/04/25 20:03:43 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;