mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 18:11:06 +00:00
Fixed deactivated menuitem.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4633 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3b761f19e8
commit
9520ed3a06
2 changed files with 13 additions and 8 deletions
|
@ -3,6 +3,8 @@
|
|||
* Source/NSMenuView.m: some fixes to get things to work correctly
|
||||
when calling menu item actions. Also autoenable should be working
|
||||
a little better.
|
||||
In setHighlightedItemIndex: if new item is disabled do not
|
||||
highlight or target action.
|
||||
* Source/NSMenuItemCell.m: drawing fixes for disabled cells.
|
||||
|
||||
1999-07-20 Michael Hanni <mhanni@sprintmail.com>
|
||||
|
|
|
@ -140,7 +140,6 @@ static float GSMenuBarHeight = 25.0; // a guess.
|
|||
- (void)setHighlightedItemIndex: (int)index
|
||||
{
|
||||
id anItem;
|
||||
BOOL _closeASubmenu = NO;
|
||||
|
||||
[self lockFocus];
|
||||
|
||||
|
@ -173,20 +172,24 @@ static float GSMenuBarHeight = 25.0; // a guess.
|
|||
}
|
||||
|
||||
if (menuv_highlightedItemIndex != index) {
|
||||
|
||||
anItem = [menuv_items_link objectAtIndex: index];
|
||||
|
||||
[anItem highlight: YES
|
||||
withFrame: [self rectOfItemAtIndex: index]
|
||||
inView: self];
|
||||
if ([anItem isEnabled])
|
||||
{
|
||||
[anItem highlight: YES
|
||||
withFrame: [self rectOfItemAtIndex: index]
|
||||
inView: self];
|
||||
|
||||
[anItem setState: 1];
|
||||
[anItem setState: 1];
|
||||
|
||||
if ([anItem hasSubmenu] && ![[anItem target] isTornOff])
|
||||
[[anItem target] display];
|
||||
if ([anItem hasSubmenu] && ![[anItem target] isTornOff])
|
||||
[[anItem target] display];
|
||||
}
|
||||
|
||||
// set ivar to new index
|
||||
menuv_highlightedItemIndex = index;
|
||||
} else {
|
||||
} else {
|
||||
menuv_highlightedItemIndex = -1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue