diff options
author | jingham <jingham> | 1999-08-13 08:07:02 (GMT) |
---|---|---|
committer | jingham <jingham> | 1999-08-13 08:07:02 (GMT) |
commit | 80208fa5e90222606737ba130091191e1f8a388e (patch) | |
tree | 0015f5f3d4d27d6e707503c8942852b226e7aa96 /mac | |
parent | 89b8341d1ba4cee97365e84da6f44f4f35f2da66 (diff) | |
download | tk-80208fa5e90222606737ba130091191e1f8a388e.zip tk-80208fa5e90222606737ba130091191e1f8a388e.tar.gz tk-80208fa5e90222606737ba130091191e1f8a388e.tar.bz2 |
Fix a bug where the background of the menu can be wrong on Appearances that use pixmaps for the background of the menu.
Diffstat (limited to 'mac')
-rw-r--r-- | mac/tkMacMenu.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/mac/tkMacMenu.c b/mac/tkMacMenu.c index 4e1693f..e1a1103 100644 --- a/mac/tkMacMenu.c +++ b/mac/tkMacMenu.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacMenu.c,v 1.12 1999/08/07 18:54:37 jingham Exp $ + * RCS: @(#) $Id: tkMacMenu.c,v 1.13 1999/08/13 08:07:02 jingham Exp $ */ #include "tkMacInt.h" @@ -3971,13 +3971,27 @@ DrawMenuEntryLabel( (int) (y + (mePtr->height - height)/2), 1); } else { if (mePtr->labelLength > 0) { - Tcl_DString itemTextDString; + Tcl_DString itemTextDString, convertedTextDString; GetEntryText(mePtr, &itemTextDString); - Tk_DrawChars(menuPtr->display, d, gc, + + /* Somehow DrawChars is changing the colors, it is odd, since + it works for the Apple Platinum Appearance, but not for + some Kaleidoscope Themes... Untill I can figure out what + exactly is going on, this will have to do: */ + + TkMacSetUpGraphicsPort(gc); + MoveTo((short) leftEdge, (short) baseline); + Tcl_UtfToExternalDString(NULL, Tcl_DStringValue(&itemTextDString), + Tcl_DStringLength(&itemTextDString), &convertedTextDString); + DrawText(Tcl_DStringValue(&convertedTextDString), 0, + Tcl_DStringLength(&convertedTextDString)); + + /* Tk_DrawChars(menuPtr->display, d, gc, tkfont, Tcl_DStringValue(&itemTextDString), Tcl_DStringLength(&itemTextDString), - leftEdge, baseline); + leftEdge, baseline); */ + Tcl_DStringFree(&itemTextDString); } } |