diff options
author | drh <drh@noemail.net> | 2001-11-27 04:36:18 (GMT) |
---|---|---|
committer | drh <drh@noemail.net> | 2001-11-27 04:36:18 (GMT) |
commit | 41143bac9b673a9ea1d9fd5196bda5b3f69ae4fd (patch) | |
tree | bd16e4fc309a9e60acfd8f0621256e8a82dff601 /win/tkWinMenu.c | |
parent | b94d68c82bfe761f04eb920f348fbd0bd1b72b0d (diff) | |
download | tk-41143bac9b673a9ea1d9fd5196bda5b3f69ae4fd.zip tk-41143bac9b673a9ea1d9fd5196bda5b3f69ae4fd.tar.gz tk-41143bac9b673a9ea1d9fd5196bda5b3f69ae4fd.tar.bz2 |
Change the behavior of menus on windows to be more consistent with native
windows menus. Disabled menu entries show their active background color
on mouseover and keyboard traversal.
FossilOrigin-Name: 84a8f46355ed337d5fc433e1c23f9653a094d535
Diffstat (limited to 'win/tkWinMenu.c')
-rw-r--r-- | win/tkWinMenu.c | 11 |
1 files changed, 9 insertions, 2 deletions
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, |