diff options
author | culler <culler> | 2020-11-17 18:19:47 (GMT) |
---|---|---|
committer | culler <culler> | 2020-11-17 18:19:47 (GMT) |
commit | 27d4c308ee4bd6b569ac727a4debd855e90de90e (patch) | |
tree | ba4744285c20d40c2de54de7f1d7b5a3ca8ffba3 | |
parent | c44eec6b68992aec638c2283da7951b7942aab46 (diff) | |
download | tk-27d4c308ee4bd6b569ac727a4debd855e90de90e.zip tk-27d4c308ee4bd6b569ac727a4debd855e90de90e.tar.gz tk-27d4c308ee4bd6b569ac727a4debd855e90de90e.tar.bz2 |
Fix [635167af14]: black menu entries -- see if this is fixed by intializing all automatic MacPixels to 0.
-rw-r--r-- | macosx/tkMacOSXColor.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c index 38b401b..6d5eb92 100644 --- a/macosx/tkMacOSXColor.c +++ b/macosx/tkMacOSXColor.c @@ -177,7 +177,7 @@ TkMacOSXRGBPixel( unsigned long green, unsigned long blue) { - MacPixel p; + MacPixel p = 0; p.pixel.colortype = rgbColor; p.pixel.value = ((red & 0xff) << 16) | ((green & 0xff) << 8) | @@ -207,7 +207,7 @@ MODULE_SCOPE unsigned long TkMacOSXClearPixel( void) { - MacPixel p; + MacPixel p = 0; p.pixel.value = 0; p.pixel.colortype = clearColor; return p.ulong; @@ -236,7 +236,7 @@ SystemColorDatum* GetEntryFromPixel( unsigned long pixel) { - MacPixel p; + MacPixel p = 0; int index = rgbColorIndex; p.ulong = pixel; @@ -314,6 +314,10 @@ GetRGBA( } } break; + case clearColor: + rgba[0] = rgba[1] = rgba[2] = 1.0; + rgba[3] = 0; + break; case semantic: if (entry->index == controlAccentIndex && useFakeAccentColor) { #if MAC_OS_X_VERSION_MIN_REQUIRED < 101400 @@ -332,8 +336,6 @@ GetRGBA( } [color getComponents: rgba]; break; - case clearColor: - rgba[3] = 0; case HIText: #ifdef __LP64__ color = [[NSColor textColor] colorUsingColorSpace:sRGB]; @@ -635,7 +637,7 @@ TkpGetColor( if (strncasecmp(name, "system", 6) == 0) { Tcl_HashEntry *hPtr = Tcl_FindHashEntry(&systemColors, name + 6); - MacPixel p; + MacPixel p = 0; if (hPtr != NULL) { SystemColorDatum *entry = (SystemColorDatum *)Tcl_GetHashValue(hPtr); |