mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-05 20:25:32 +00:00
Added image support for overflow toolbaritems. Also disabled the menu items if the toolbar is disabled.
This commit is contained in:
1 parent
9a302328c6
commit
2a2b320be3
1 file changed
+7
-5
+7
-5
@@ -563,6 +563,7 @@ var _CPToolbarItemInfoMake = function(anIndex, aView, aLabel, aMinWidth)
|
||||
|
||||
[_additionalItemsButton setImagePosition:CPImageOnly];
|
||||
[[_additionalItemsButton menu] setShowsStateColumn:NO];
|
||||
[[_additionalItemsButton menu] setAutoenablesItems:NO];
|
||||
|
||||
[_additionalItemsButton setAlternateImage:_CPToolbarViewExtraItemsAlternateImage];
|
||||
}
|
||||
@@ -793,14 +794,13 @@ var _CPToolbarItemInfoMake = function(anIndex, aView, aLabel, aMinWidth)
|
||||
|
||||
hasNonSeparatorItem = YES;
|
||||
|
||||
[_additionalItemsButton addItemWithTitle:[item label]];
|
||||
|
||||
var menuItem = [_additionalItemsButton itemArray][index + 1];
|
||||
var menuItem = [[CPMenuItem alloc] initWithTitle:[item label] action:[item action] keyEquivalent:nil];
|
||||
|
||||
[menuItem setImage:[item image]];
|
||||
|
||||
[menuItem setTarget:[item target]];
|
||||
[menuItem setAction:[item action]];
|
||||
[menuItem setEnabled:[item isEnabled]];
|
||||
|
||||
[_additionalItemsButton addItem:menuItem];
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1055,6 +1055,8 @@ var TOP_MARGIN = 5.0,
|
||||
[_imageView setAlphaValue:0.5];
|
||||
[_labelField setAlphaValue:0.5];
|
||||
}
|
||||
|
||||
[_toolbar tile];
|
||||
}
|
||||
|
||||
- (CPColor)FIXME_labelColor
|
||||
|
||||
Reference in new issue
Block a user