summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2009-12-27 23:42:45 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2009-12-27 23:42:45 (GMT)
commit35abdae6af76bd2cb9012a57d901c748952bd2a6 (patch)
tree39e9bb48bb271f76110860ea18e440914314f2f0 /win
parent5951d917af47ce8a6067ce7433a69a3549f7efca (diff)
downloadtk-35abdae6af76bd2cb9012a57d901c748952bd2a6.zip
tk-35abdae6af76bd2cb9012a57d901c748952bd2a6.tar.gz
tk-35abdae6af76bd2cb9012a57d901c748952bd2a6.tar.bz2
Highlight for cascade items in torn-off menus is incorrect on Windows.
Applied patch from [Bug 2879927].
Diffstat (limited to 'win')
-rw-r--r--win/tkWinMenu.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c
index 6b9bad9..8e19e0a 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinMenu.c,v 1.59.2.3 2009/09/14 23:40:42 hobbs Exp $
+ * RCS: @(#) $Id: tkWinMenu.c,v 1.59.2.4 2009/12/27 23:42:45 patthoyts Exp $
*/
#define OEMRESOURCE
@@ -1762,7 +1762,8 @@ DrawMenuEntryAccelerator(
* DrawMenuEntryArrow --
*
* This function draws the arrow bitmap on the right side of a menu
- * entry. This function is currently unused.
+ * entry. This function is only used when drawing the arrow for a
+ * disabled cascade menu.
*
* Results:
* None.
@@ -1811,8 +1812,10 @@ DrawMenuEntryArrow(
gc->background = activeBgColor->pixel;
}
- gc->foreground = GetSysColor((mePtr->state == ENTRY_DISABLED) ?
- COLOR_GRAYTEXT : COLOR_MENUTEXT);
+ gc->foreground = GetSysColor((mePtr->state == ENTRY_DISABLED)
+ ? COLOR_GRAYTEXT
+ : ((mePtr->state == ENTRY_ACTIVE)
+ ? COLOR_HIGHLIGHTTEXT : COLOR_MENUTEXT));
rect.top = y + GetSystemMetrics(SM_CYBORDER);
rect.bottom = y + height - GetSystemMetrics(SM_CYBORDER);