Further fixes for separator items

Signed-off-by: 280north <admin+280north@280north.com>
This commit is contained in:
nciagra authored and 280north committed 2009-01-05 07:50:49 +08:00
1 parent 3235cfd288
commit 78b84be3fd
1 file changed
+13 -8
+13 -8
View File
@@ -729,15 +729,9 @@ CPControlKeyMask
{
self = [super initWithTitle:@"" action:nil keyEquivalent:nil];
if(self)
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 setAutoresizingMask:CPViewWidthSizable];
[view addSubview:line];
[self setView:view];
[self setEnabled:NO];
}
return self;
@@ -933,6 +927,17 @@ var _CPMenuItemSelectionColor = nil,
var view = [_menuItem view];
if ([_menuItem isSeparatorItem])
{
var line = [[CPView alloc] initWithFrame:CGRectMake(0.0, 8.0, 1000.0, 1.3)];
view = [[CPView alloc] initWithFrame:CGRectMake(0.0, 0.0, 0.0, 20.0)];
[view setAutoresizingMask:CPViewWidthSizable];
[line setBackgroundColor:[CPColor lightGrayColor]];
[view addSubview:line];
}
if (view)
{
[_imageAndTitleView removeFromSuperview];