summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2019-08-15 12:23:35 (GMT)
committerKevin Walzer <kw@codebykevin.com>2019-08-15 12:23:35 (GMT)
commitb6102f5fb59357a7d8332f351fa0599b54e9ed44 (patch)
tree0c6a010485461ceb7c8e316a5eb4568aa0c6c53b /macosx
parent3852998b93c968577e0d7d17f57aceb6a2e226af (diff)
downloadtk-b6102f5fb59357a7d8332f351fa0599b54e9ed44.zip
tk-b6102f5fb59357a7d8332f351fa0599b54e9ed44.tar.gz
tk-b6102f5fb59357a7d8332f351fa0599b54e9ed44.tar.bz2
Tweak display of bitmaps in menus on macOS; thanks to Christopher Chavez for the patch
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXMenu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index 790b6ff..4c1ad51 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -628,6 +628,10 @@ TkpConfigureMenuEntry(
&imageHeight);
image = TkMacOSXGetNSImageWithBitmap(mePtr->menuPtr->display, bitmap,
gc, imageWidth, imageHeight);
+ if (gc->foreground == defaultFg) {
+ // Use a semantic foreground color by default
+ [image setTemplate:YES];
+ }
}
[menuItem setImage:image];
if ((!image || mePtr->compound != COMPOUND_NONE) && mePtr->labelPtr &&