summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--win/tkWinMenu.c11
2 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index d59207a..39a1938 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-11-26 D. Richard Hipp <drh@hwaci.com>
+
+ * win/tkWinMenu.c: disabled menu items show the activebackground
+ color in their background. This change makes menu behavior
+ consistent with what native windows does.
+
2001-11-24 Mo DeJong <mdejong@users.sourceforge.net>
* unix/Makefile.in: Add comments to better describe
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c
index f612690..f1c07d7 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.c
@@ -9,7 +9,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.16 2001/10/12 13:30:32 tmh Exp $
+ * RCS: @(#) $Id: tkWinMenu.c,v 1.17 2001/11/27 04:36:18 drh Exp $
*/
#define OEMRESOURCE
@@ -1078,6 +1078,12 @@ TkWinHandleMenuEvent(phwnd, pMessage, pwParam, plParam, plResult)
} else {
TkActivateMenuEntry(menuPtr, -1);
}
+ } else {
+ if (itemPtr->itemState & ODS_SELECTED) {
+ mePtr->entryFlags |= ENTRY_PLATFORM_FLAG1;
+ } else {
+ mePtr->entryFlags &= ~ENTRY_PLATFORM_FLAG1;
+ }
}
tkfont = Tk_GetFontFromObj(menuPtr->tkwin, menuPtr->fontPtr);
@@ -2408,7 +2414,8 @@ DrawMenuEntryBackground(
int width, /* width of rectangle to draw */
int height) /* height of rectangle to draw */
{
- if (mePtr->state == ENTRY_ACTIVE) {
+ if (mePtr->state == ENTRY_ACTIVE
+ || (mePtr->entryFlags & ENTRY_PLATFORM_FLAG1)!=0 ) {
bgBorder = activeBorder;
}
Tk_Fill3DRectangle(menuPtr->tkwin, d, bgBorder,