summaryrefslogtreecommitdiffstats
path: root/mac/tkMacMenu.c
diff options
context:
space:
mode:
authorjingham <jingham@noemail.net>1999-08-13 08:07:02 (GMT)
committerjingham <jingham@noemail.net>1999-08-13 08:07:02 (GMT)
commit6820e1fb624cb5c24cd11fa463156671cf1ac538 (patch)
tree0015f5f3d4d27d6e707503c8942852b226e7aa96 /mac/tkMacMenu.c
parentad7a1fe7c16aa5b43e03570201403a810d0f9146 (diff)
downloadtk-6820e1fb624cb5c24cd11fa463156671cf1ac538.zip
tk-6820e1fb624cb5c24cd11fa463156671cf1ac538.tar.gz
tk-6820e1fb624cb5c24cd11fa463156671cf1ac538.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.
FossilOrigin-Name: 844af9d9f14dd2fb043ec6152a2fdd0fb213f839
Diffstat (limited to 'mac/tkMacMenu.c')
-rw-r--r--mac/tkMacMenu.c22
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);
}
}