summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixButton.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2004-05-04 00:39:45 (GMT)
committerhobbs <hobbs>2004-05-04 00:39:45 (GMT)
commitcfa2caa8be76ffed4179c1f51779095c837cab14 (patch)
tree8a0a2f122e8d7b5b26cf32df9ce0a06faa142ca5 /unix/tkUnixButton.c
parentd29e8db2badac2db52e78d1726b1cd2f105e64e6 (diff)
downloadtk-cfa2caa8be76ffed4179c1f51779095c837cab14.zip
tk-cfa2caa8be76ffed4179c1f51779095c837cab14.tar.gz
tk-cfa2caa8be76ffed4179c1f51779095c837cab14.tar.bz2
* unix/tkUnixButton.c (TkpDrawCheckIndicator): allow radiobuttons
to be drawn when disabledforeground and/or selectcolor are NULL. [Bug #826850] (griffin)
Diffstat (limited to 'unix/tkUnixButton.c')
-rw-r--r--unix/tkUnixButton.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/unix/tkUnixButton.c b/unix/tkUnixButton.c
index 4f9e8dc..526f70b 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.18 2004/03/16 19:55:12 hobbs Exp $
+ * RCS: @(#) $Id: tkUnixButton.c,v 1.19 2004/05/04 00:39:51 hobbs Exp $
*/
#include "tkButton.h"
@@ -165,11 +165,18 @@ TkpDrawCheckIndicator(tkwin, display, d, x, y, bgBorder, indicatorColor,
*/
if (tkwin == NULL || display == None || d == None || bgBorder == NULL
- || indicatorColor == NULL || selectColor == NULL
- || disableColor == NULL) {
+ || indicatorColor == NULL) {
return;
}
+ if (disableColor == NULL) {
+ disableColor = bg_brdr->bgColorPtr;
+ }
+
+ if (selectColor == NULL) {
+ selectColor = bg_brdr->bgColorPtr;
+ }
+
depth = Tk_Depth(tkwin);
/*
@@ -249,8 +256,6 @@ TkpDrawCheckIndicator(tkwin, display, d, x, y, bgBorder, indicatorColor,
WhitePixelOfScreen(bg_brdr->screen);
imgColors[3 /*D*/] =
Tk_GetColorByValue(tkwin, selectColor)->pixel;
- imgColors[4 /*E*/] =
- Tk_GetColorByValue(tkwin, bg_brdr->darkColorPtr)->pixel;
imgColors[4 /*E*/] = (bg_brdr->darkColorPtr != NULL) ?
Tk_GetColorByValue(tkwin, bg_brdr->darkColorPtr)->pixel :
BlackPixelOfScreen(bg_brdr->screen);