mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 13:50:37 +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
1460f5b1f5
commit
a0a394a632
2 changed files with 13 additions and 8 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue