mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-19 21:19:24 +00:00
Added menu item separators and a + menuBarHeight
Signed-off-by: 280north <admin+280north@280north.com>
This commit is contained in:
1 parent
f5963ecc30
commit
67658876d5
2 files changed
+25
-1
No files matched your search
@@ -179,6 +179,14 @@ var _CPMenuBarVisible = NO,
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
+ (float)menuBarHeight
|
||||
{
|
||||
if ([self menuBarVisible])
|
||||
return MENUBAR_HEIGHT;
|
||||
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
// Creating a CPMenu Object
|
||||
/*!
|
||||
Initializes the menu with a specified title.
|
||||
@@ -998,6 +1006,10 @@ var STICKY_TIME_INTERVAL = 500,
|
||||
|
||||
[self setFrameSize:CGSizeMake(LEFT_MARGIN + menuViewSize.width + RIGHT_MARGIN, TOP_MARGIN + menuViewSize.height + BOTTOM_MARGIN)];
|
||||
|
||||
for(var i = 0; i < [aMenu numberOfItems]; i++)
|
||||
if([[aMenu itemAtIndex:i] isSeparatorItem])
|
||||
[[[aMenu itemAtIndex:i] view] setFrameSize:CPSizeMake(menuViewSize.width, 20.0)];
|
||||
|
||||
[_menuView scrollPoint:CGPointMake(0.0, 0.0)];
|
||||
[_menuClipView setFrame:CGRectMake(LEFT_MARGIN, TOP_MARGIN, menuViewSize.width, menuViewSize.height)];
|
||||
}
|
||||
|
||||
+13
-1
@@ -727,7 +727,19 @@ CPControlKeyMask
|
||||
|
||||
- (id)init
|
||||
{
|
||||
return [super initWithTitle:@"" action:nil keyEquivalent:@""];
|
||||
self = [super initWithTitle:@"" action:nil keyEquivalent:nil];
|
||||
|
||||
if(self)
|
||||
{
|
||||
var view = [[CPView alloc] initWithFrame:CGRectMake(0.0, 0.0, 0.0, 20.0)],
|
||||
line = [[CPView alloc] initWithFrame:CGRectMake(0.0, 8.0, 1000.0, 1.3)];
|
||||
[line setBackgroundColor:[CPColor lightGrayColor]];
|
||||
[view addSubview:line];
|
||||
|
||||
[self setView:view];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (BOOL)isSeparatorItem
|
||||
|
||||
Reference in new issue
Block a user