mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 07:20:58 +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
|
@ -3,6 +3,8 @@
|
||||||
* Source/NSMenuView.m: some fixes to get things to work correctly
|
* Source/NSMenuView.m: some fixes to get things to work correctly
|
||||||
when calling menu item actions. Also autoenable should be working
|
when calling menu item actions. Also autoenable should be working
|
||||||
a little better.
|
a little better.
|
||||||
|
In setHighlightedItemIndex: if new item is disabled do not
|
||||||
|
highlight or target action.
|
||||||
* Source/NSMenuItemCell.m: drawing fixes for disabled cells.
|
* Source/NSMenuItemCell.m: drawing fixes for disabled cells.
|
||||||
|
|
||||||
1999-07-20 Michael Hanni <mhanni@sprintmail.com>
|
1999-07-20 Michael Hanni <mhanni@sprintmail.com>
|
||||||
|
|
|
@ -140,7 +140,6 @@ static float GSMenuBarHeight = 25.0; // a guess.
|
||||||
- (void)setHighlightedItemIndex: (int)index
|
- (void)setHighlightedItemIndex: (int)index
|
||||||
{
|
{
|
||||||
id anItem;
|
id anItem;
|
||||||
BOOL _closeASubmenu = NO;
|
|
||||||
|
|
||||||
[self lockFocus];
|
[self lockFocus];
|
||||||
|
|
||||||
|
@ -173,16 +172,20 @@ static float GSMenuBarHeight = 25.0; // a guess.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (menuv_highlightedItemIndex != index) {
|
if (menuv_highlightedItemIndex != index) {
|
||||||
|
|
||||||
anItem = [menuv_items_link objectAtIndex: index];
|
anItem = [menuv_items_link objectAtIndex: index];
|
||||||
|
|
||||||
[anItem highlight: YES
|
if ([anItem isEnabled])
|
||||||
withFrame: [self rectOfItemAtIndex: index]
|
{
|
||||||
inView: self];
|
[anItem highlight: YES
|
||||||
|
withFrame: [self rectOfItemAtIndex: index]
|
||||||
|
inView: self];
|
||||||
|
|
||||||
[anItem setState: 1];
|
[anItem setState: 1];
|
||||||
|
|
||||||
if ([anItem hasSubmenu] && ![[anItem target] isTornOff])
|
if ([anItem hasSubmenu] && ![[anItem target] isTornOff])
|
||||||
[[anItem target] display];
|
[[anItem target] display];
|
||||||
|
}
|
||||||
|
|
||||||
// set ivar to new index
|
// set ivar to new index
|
||||||
menuv_highlightedItemIndex = index;
|
menuv_highlightedItemIndex = index;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue