summaryrefslogtreecommitdiffstats
path: root/win/tkWinMenu.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-07-31 14:39:04 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-07-31 14:39:04 (GMT)
commit57697b5b22a5851bca41ba3ec058f1de355ba5dc (patch)
tree6faf126294b1235b3307dcc394cab895489ceef6 /win/tkWinMenu.c
parentd4a4017589dd52fa8e9667df9d754fd62abd6bed (diff)
downloadtk-57697b5b22a5851bca41ba3ec058f1de355ba5dc.zip
tk-57697b5b22a5851bca41ba3ec058f1de355ba5dc.tar.gz
tk-57697b5b22a5851bca41ba3ec058f1de355ba5dc.tar.bz2
minor improvements to flag handling
Diffstat (limited to 'win/tkWinMenu.c')
-rw-r--r--win/tkWinMenu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c
index f12e965..cab0880 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.c
@@ -1786,7 +1786,7 @@ DrawMenuEntryAccelerator(
COLORREF oldFgColor = gc->foreground;
gc->foreground = GetSysColor(COLOR_3DHILIGHT);
- if ((mePtr->entryFlags & ENTRY_PLATFORM_FLAG1) == 0) {
+ if (!(mePtr->entryFlags & ENTRY_PLATFORM_FLAG1)) {
Tk_DrawChars(menuPtr->display, d, gc, tkfont, accel,
mePtr->accelLength, leftEdge + 1, baseline + 1);
}
@@ -2318,8 +2318,9 @@ DrawMenuEntryLabel(
*/
if ((mePtr->state == ENTRY_DISABLED) &&
- ((mePtr->entryFlags & ENTRY_PLATFORM_FLAG1) == 0)) {
+ !(mePtr->entryFlags & ENTRY_PLATFORM_FLAG1)) {
COLORREF oldFgColor = gc->foreground;
+
gc->foreground = GetSysColor(COLOR_3DHILIGHT);
Tk_DrawChars(menuPtr->display, d, gc, tkfont, label,
mePtr->labelLength, leftEdge + textXOffset + 1,