From edd49f222e4edc981c18e9fd404b2d66fa443adb Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Thu, 6 Nov 2008 00:12:47 -0800 Subject: [PATCH] Added a number of customization options to the main menubar. Reviewed by me. --- AppKit/CPMenu.j | 88 ++++++++++++++++-- AppKit/CPMenuItem.j | 84 +++++++++++++---- .../_CPMenuItemViewMenuBarArrow.png | Bin 2872 -> 0 bytes .../_CPMenuItemViewMenuBarArrowActivated.png | Bin 2869 -> 0 bytes AppKit/_CPImageAndTitleView.j | 1 + 5 files changed, 148 insertions(+), 25 deletions(-) delete mode 100644 AppKit/Resources/_CPMenuItemView/_CPMenuItemViewMenuBarArrow.png delete mode 100644 AppKit/Resources/_CPMenuItemView/_CPMenuItemViewMenuBarArrowActivated.png diff --git a/AppKit/CPMenu.j b/AppKit/CPMenu.j index acf210e68..20fc13173 100644 --- a/AppKit/CPMenu.j +++ b/AppKit/CPMenu.j @@ -25,7 +25,6 @@ @import @import -@import "_CPImageAndTitleView.j" @import "CPApplication.j" @import "CPClipView.j" @import "CPMenuItem.j" @@ -46,6 +45,7 @@ var _CPMenuBarVisible = NO, _CPMenuBarTitle = @"", _CPMenuBarIconImage = nil, _CPMenuBarIconImageAlphaValue = 1.0, + _CPMenuBarAttributes = nil, _CPMenuBarSharedWindow = nil; /*! @class CPMenu @@ -93,6 +93,10 @@ var _CPMenuBarVisible = NO, [_CPMenuBarSharedWindow setIconImage:_CPMenuBarIconImage]; [_CPMenuBarSharedWindow setIconImageAlphaValue:_CPMenuBarIconImageAlphaValue]; + [_CPMenuBarSharedWindow setColor:[_CPMenuBarAttributes objectForKey:@"CPMenuBarBackgroundColor"]]; + [_CPMenuBarSharedWindow setTextColor:[_CPMenuBarAttributes objectForKey:@"CPMenuBarTextColor"]]; + [_CPMenuBarSharedWindow setTitleColor:[_CPMenuBarAttributes objectForKey:@"CPMenuBarTitleColor"]]; + [_CPMenuBarSharedWindow orderFront:self]; } else @@ -126,6 +130,41 @@ var _CPMenuBarVisible = NO, return _CPMenuBarImage; } ++ (void)setMenuBarAttributes:(CPDictionary)attributes +{ + if (_CPMenuBarAttributes == attributes) + return; + + _CPMenuBarAttributes = [attributes copy]; + + var textColor = [attributes objectForKey:@"CPMenuBarTextColor"], + titleColor = [attributes objectForKey:@"CPMenuBarTitleColor"]; + + if (!textColor && titleColor) + [_CPMenuBarAttributes setObject:titleColor forKey:@"CPMenuBarTextColor"]; + + else if (textColor && !titleColor) + [_CPMenuBarAttributes setObject:textColor forKey:@"CPMenuBarTitleColor"]; + + else if (!textColor && !titleColor) + { + [_CPMenuBarAttributes setObject:[CPColor blackColor] forKey:@"CPMenuBarTextColor"]; + [_CPMenuBarAttributes setObject:[CPColor blackColor] forKey:@"CPMenuBarTitleColor"]; + } + + if (_CPMenuBarSharedWindow) + { + [_CPMenuBarSharedWindow setColor:[_CPMenuBarAttributes objectForKey:@"CPMenuBarBackgroundColor"]]; + [_CPMenuBarSharedWindow setTextColor:[_CPMenuBarAttributes objectForKey:@"CPMenuBarTextColor"]]; + [_CPMenuBarSharedWindow setTitleColor:[_CPMenuBarAttributes objectForKey:@"CPMenuBarTitleColor"]]; + } +} + ++ (CPDictionary)menuBarAttributes +{ + return _CPMenuBarAttributes; +} + + (void)_setMenuBarIconImageAlphaValue:(float)anAlphaValue { _CPMenuBarIconImageAlphaValue = anAlphaValue; @@ -1312,6 +1351,9 @@ var _CPMenuBarWindowBackgroundColor = nil, CPImageView _iconImageView; CPTextField _titleField; + + CPColor _textColor; + CPColor _titleColor; } + (void)initialize @@ -1321,8 +1363,6 @@ var _CPMenuBarWindowBackgroundColor = nil, var bundle = [CPBundle bundleForClass:self]; - _CPMenuBarWindowBackgroundColor = [CPColor colorWithPatternImage:[[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"_CPMenuBarWindow/_CPMenuBarWindowBackground.png"] size:CGSizeMake(1.0, 18.0)]]; - _CPMenuBarWindowFont = [CPFont systemFontOfSize:11.0]; } @@ -1340,7 +1380,6 @@ var _CPMenuBarWindowBackgroundColor = nil, var contentView = [self contentView]; - [contentView setBackgroundColor:_CPMenuBarWindowBackgroundColor]; [contentView setAutoresizesSubviews:NO]; [self setBecomesKeyOnlyIfNeeded:YES]; @@ -1350,11 +1389,9 @@ var _CPMenuBarWindowBackgroundColor = nil, [contentView addSubview:_iconImageView]; - _titleField = [[_CPImageAndTitleView alloc] initWithFrame:CGRectMakeZero()]; + _titleField = [[CPTextField alloc] initWithFrame:CGRectMakeZero()]; [_titleField setFont:[CPFont boldSystemFontOfSize:12.0]]; - - [_titleField setImagePosition:CPImageLeft]; [_titleField setAlignment:CPCenterTextAlignment]; [contentView addSubview:_titleField]; @@ -1376,7 +1413,7 @@ var _CPMenuBarWindowBackgroundColor = nil, document.title = bundleName; #endif - [_titleField setTitle:aTitle]; + [_titleField setStringValue:aTitle]; [_titleField sizeToFit]; [self tile]; @@ -1395,6 +1432,39 @@ var _CPMenuBarWindowBackgroundColor = nil, [_iconImageView setAlphaValue:anAlphaValue]; } +- (void)setColor:(CPColor)aColor +{ + if (!aColor) + { + if (!_CPMenuBarWindowBackgroundColor) + _CPMenuBarWindowBackgroundColor = [CPColor colorWithPatternImage:[[CPImage alloc] initWithContentsOfFile:[[CPBundle bundleForClass:[_CPMenuBarWindow class]] pathForResource:@"_CPMenuBarWindow/_CPMenuBarWindowBackground.png"] size:CGSizeMake(1.0, 18.0)]]; + + [[self contentView] setBackgroundColor:_CPMenuBarWindowBackgroundColor]; + } + else + [[self contentView] setBackgroundColor:aColor]; +} + +- (void)setTextColor:(CPColor)aColor +{ + if (_textColor == aColor) + return; + + _textColor = aColor; + + [_menuItemViews makeObjectsPerformSelector:@selector(setTextColor:) withObject:_textColor]; +} + +- (void)setTitleColor:(CPColor)aColor +{ + if (_titleColor == aColor) + return; + + _titleColor = aColor; + + [_titleField setTextColor:aColor ? aColor : [CPColor blackColor]]; +} + - (void)setMenu:(CPMenu)aMenu { if (_menu == aMenu) @@ -1465,6 +1535,7 @@ var _CPMenuBarWindowBackgroundColor = nil, [menuItemView setShowsStateColumn:NO]; [menuItemView setBelongsToMenuBar:YES]; [menuItemView setFont:_CPMenuBarWindowFont]; + [menuItemView setTextColor:_textColor]; [menuItemView setHidden:[item isHidden]]; [menuItemView synchronizeWithMenuItem]; @@ -1497,6 +1568,7 @@ var _CPMenuBarWindowBackgroundColor = nil, [menuItemView setShowsStateColumn:NO]; [menuItemView setBelongsToMenuBar:YES]; [menuItemView setFont:_CPMenuBarWindowFont]; + [menuItemView setTextColor:_textColor]; [menuItemView setHidden:[menuItem isHidden]]; [menuItemView synchronizeWithMenuItem]; diff --git a/AppKit/CPMenuItem.j b/AppKit/CPMenuItem.j index 1459f3bcb..ad6bd9635 100644 --- a/AppKit/CPMenuItem.j +++ b/AppKit/CPMenuItem.j @@ -843,6 +843,7 @@ var _CPMenuItemSelectionColor = nil, CPMenuItem _menuItem; CPFont _font; + CPColor _textColor; CGSize _minSize; BOOL _isDirty; @@ -851,7 +852,7 @@ var _CPMenuItemSelectionColor = nil, CPImageView _stateView; _CPImageAndTitleView _imageAndTitleView; - CPImageView _submenuImageView; + CPView _submenuView; } + (void)initialize @@ -923,8 +924,8 @@ var _CPMenuItemSelectionColor = nil, [_stateView removeFromSuperview]; _stateView = nil; - [_submenuImageView removeFromSuperview]; - _submenuImageView = nil; + [_submenuView removeFromSuperview]; + _submenuView = nil; _minSize = [view frame].size; @@ -985,11 +986,11 @@ var _CPMenuItemSelectionColor = nil, if (!font) font = _font; - + [_imageAndTitleView setFont:font]; [_imageAndTitleView setImage:[_menuItem image]]; [_imageAndTitleView setTitle:[_menuItem title]]; - [_imageAndTitleView setTextColor:[_menuItem isEnabled] ? [CPColor blackColor] : [CPColor darkGrayColor]]; + [_imageAndTitleView setTextColor:[self textColor]]; [_imageAndTitleView setFrameOrigin:CGPointMake(x, 0.0)]; [_imageAndTitleView sizeToFit]; @@ -1001,24 +1002,24 @@ var _CPMenuItemSelectionColor = nil, // Submenu Arrow if ([_menuItem hasSubmenu]) { - if (!_submenuImageView) + if (!_submenuView) { - _submenuImageView = [[CPImageView alloc] initWithFrame:CGRectMake(0.0, 0.0, 10.0, 10.0)]; + _submenuView = [[_CPMenuItemArrowView alloc] initWithFrame:CGRectMake(0.0, 0.0, 10.0, 10.0)]; - [self addSubview:_submenuImageView]; + [self addSubview:_submenuView]; } if (_belongsToMenuBar && !_CPMenuItemViewMenuBarArrowImage) _CPMenuItemViewMenuBarArrowImage = [[CPImage alloc] initWithContentsOfFile:[[CPBundle bundleForClass:[_CPMenuItemView class]] pathForResource:@"_CPMenuItemView/_CPMenuItemViewMenuBarArrow.png"] size:CGSizeMake(10.0, 10.0)]; - [_submenuImageView setHidden:NO]; - [_submenuImageView setImage:_belongsToMenuBar ? _CPMenuItemViewMenuBarArrowImage : nil]; - [_submenuImageView setFrameOrigin:CGPointMake(x, (CGRectGetHeight(frame) - 10.0) / 2.0)]; + [_submenuView setHidden:NO]; + [_submenuView setColor:_belongsToMenuBar ? [self textColor] : nil]; + [_submenuView setFrameOrigin:CGPointMake(x, (CGRectGetHeight(frame) - 10.0) / 2.0)]; x += 10.0; } else - [_submenuImageView setHidden:YES]; + [_submenuView setHidden:YES]; _minSize = CGSizeMake(x + (_belongsToMenuBar ? 0.0 : RIGHT_MARGIN), CGRectGetHeight(frame)); @@ -1052,7 +1053,7 @@ var _CPMenuItemSelectionColor = nil, else { - [_imageAndTitleView setTextColor:shouldHighlight ? [CPColor whiteColor] : [CPColor blackColor]]; + [_imageAndTitleView setTextColor:shouldHighlight ? [CPColor whiteColor] : [self textColor]]; if (shouldHighlight) [self setBackgroundColor:_CPMenuItemSelectionColor]; @@ -1083,12 +1084,12 @@ var _CPMenuItemSelectionColor = nil, _CPMenuItemViewMenuBarArrowActivatedImage = [[CPImage alloc] initWithContentsOfFile:[[CPBundle bundleForClass:[_CPMenuItemView class]] pathForResource:@"_CPMenuItemView/_CPMenuItemViewMenuBarArrowActivated.png"] size:CGSizeMake(10.0, 10.0)]; [_imageAndTitleView setTextColor:[CPColor whiteColor]]; - [_submenuImageView setImage:_CPMenuItemViewMenuBarArrowActivatedImage]; + [_submenuView setColor:[CPColor whiteColor]]; } else { - [_imageAndTitleView setTextColor:[CPColor blackColor]]; - [_submenuImageView setImage:_CPMenuItemViewMenuBarArrowImage]; + [_imageAndTitleView setTextColor:[self textColor]]; + [_submenuView setColor:[self textColor]]; } } @@ -1097,7 +1098,7 @@ var _CPMenuItemSelectionColor = nil, if (![_menuItem hasSubmenu]) return NO; - return CGRectContainsPoint([_submenuImageView frame], [self convertPoint:[anEvent locationInWindow] fromView:nil]); + return CGRectContainsPoint([_submenuView frame], [self convertPoint:[anEvent locationInWindow] fromView:nil]); } - (BOOL)isHidden @@ -1120,5 +1121,54 @@ var _CPMenuItemSelectionColor = nil, [self setDirty]; } +- (void)setTextColor:(CPColor)aColor +{ + if (_textColor == aColor) + return; + + _textColor = aColor; + + [_imageAndTitleView setTextColor:[self textColor]]; + [_submenuView setColor:[self textColor]]; +} + +- (CPColor)textColor +{ + return [_menuItem isEnabled] ? (_textColor ? _textColor : [CPColor blackColor]) : [CPColor darkGrayColor]; +} + @end +@implementation _CPMenuItemArrowView : CPView +{ + CPColor _color; +} + +- (void)setColor:(CPColor)aColor +{ + if (_color == aColor) + return; + + _color = aColor; + + [self setNeedsDisplay:YES]; +} + +- (void)drawRect:(CGRect)aRect +{ + var context = [[CPGraphicsContext currentContext] graphicsPort]; + + CGContextBeginPath(context); + + CGContextMoveToPoint(context, 1.0, 4.0); + CGContextAddLineToPoint(context, 9.0, 4.0); + CGContextAddLineToPoint(context, 5.0, 8.0); + CGContextAddLineToPoint(context, 1.0, 4.0); + + CGContextClosePath(context); + + CGContextSetFillColor(context, _color); + CGContextFillPath(context); +} + +@end diff --git a/AppKit/Resources/_CPMenuItemView/_CPMenuItemViewMenuBarArrow.png b/AppKit/Resources/_CPMenuItemView/_CPMenuItemViewMenuBarArrow.png deleted file mode 100644 index 27ac7e02e89f979b057111ba2df128e44c1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P6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0001BNklJQ5X2nBDhvTzWDjPbUl9Nlk^6@{PBM8VfO&thRd2z5RMmvv>~x8FqQS T@-ryK00000NkvXXu0mjf{nAl= diff --git a/AppKit/_CPImageAndTitleView.j b/AppKit/_CPImageAndTitleView.j index 3486fa4f1..1b24331f4 100644 --- a/AppKit/_CPImageAndTitleView.j +++ b/AppKit/_CPImageAndTitleView.j @@ -238,6 +238,7 @@ [_titleField setAlignment:_alignment]; [_titleField setTextColor:_textColor]; [_titleField setHidden:_imagePosition == CPImageOnly]; + [_titleField setHitTests:NO]; [self addSubview:_titleField]; }