diff --git a/AppKit/CPMenu/_CPMenuWindow.j b/AppKit/CPMenu/_CPMenuWindow.j index a91146f3c..bc7726ac5 100644 --- a/AppKit/CPMenu/_CPMenuWindow.j +++ b/AppKit/CPMenu/_CPMenuWindow.j @@ -413,7 +413,7 @@ var STICKY_TIME_INTERVAL = 500; + (id)themeAttributes { return [CPDictionary dictionaryWithObjects:[ [CPNull null], [CPNull null], [CPNull null], [CPNull null], CGInsetMake(5.0, 1.0, 1.0, 5.0), 16.0, - [CPNull null], [CPNull null], 30.0, 10.0, 10.0, 10.0, + [CPNull null], [CPNull null], [CPNull null], 30.0, 10.0, 10.0, 10.0, [CPNull null], [CPNull null], [CPNull null], [CPNull null], [CPNull null], [CPNull null], [CPNull null], 28.0, [CPNull null], 1.0, [CPNull null], [CPNull null], [CPNull null]] forKeys:[ @"menu-window-more-above-image", @@ -424,6 +424,7 @@ var STICKY_TIME_INTERVAL = 500; @"menu-window-scroll-indicator-height", @"menu-bar-window-background-color", + @"menu-bar-window-background-selected-color", @"menu-bar-window-font", @"menu-bar-window-height", @"menu-bar-window-margin", diff --git a/AppKit/CPMenuItem/_CPMenuItemMenuBarView.j b/AppKit/CPMenuItem/_CPMenuItemMenuBarView.j index 807bf0c18..e088515c3 100644 --- a/AppKit/CPMenuItem/_CPMenuItemMenuBarView.j +++ b/AppKit/CPMenuItem/_CPMenuItemMenuBarView.j @@ -21,9 +21,8 @@ + (id)themeAttributes { - return [CPDictionary dictionaryWithObjects:[[CPNull null], [CPNull null], [CPNull null], [CPNull null], 8.0, 3.0, 4.0] - forKeys:[ @"selection-color", - @"submenu-indicator-color", + return [CPDictionary dictionaryWithObjects:[[CPNull null], [CPNull null], [CPNull null], 8.0, 3.0, 4.0] + forKeys:[ @"submenu-indicator-color", @"menu-item-selection-color", @"menu-item-text-shadow-color", @"horizontal-margin", @@ -142,7 +141,7 @@ if (shouldHighlight) { if (![_menuItem _isMenuBarButton]) - [self setBackgroundColor:[self valueForThemeAttribute:@"selection-color"]]; + [self setBackgroundColor:[[CPTheme defaultTheme] valueForAttributeWithName:@"menu-bar-window-background-selected-color" forClass:_CPMenuView]]; [_imageAndTextView setImage:[_menuItem alternateImage] || [_menuItem image]]; [_imageAndTextView setTextColor:[CPColor whiteColor]]; diff --git a/AppKit/Themes/Aristo/ThemeDescriptors.j b/AppKit/Themes/Aristo/ThemeDescriptors.j index 93d2eb4a7..2760c3f22 100755 --- a/AppKit/Themes/Aristo/ThemeDescriptors.j +++ b/AppKit/Themes/Aristo/ThemeDescriptors.j @@ -2494,11 +2494,8 @@ var themedButtonValues = nil, { var menuItemMenuBarView = [[_CPMenuItemMenuBarView alloc] initWithFrame:CGRectMake(0.0, 0.0, 16.0, 16.0)], - selectionColor = PatternColor(@"menu-bar-window-background-selected.png", 1.0, 28.0), - themeValues = [ - [@"selection-color", selectionColor], [@"submenu-indicator-color", [CPColor grayColor]], [@"menu-item-selection-color", [CPColor colorWithHexString:@"5C85D8"]], [@"menu-item-text-shadow-color", [CPColor colorWithCalibratedRed:26.0 / 255.0 green: 73.0 / 255.0 blue:109.0 / 255.0 alpha:1.0]], @@ -2586,6 +2583,7 @@ var themedButtonValues = nil, ), menuBarWindowBackgroundColor = PatternColor(@"menu-bar-window-background.png", 1.0, 28.0), + menuBarWindowBackgroundSelectedColor = PatternColor(@"menu-bar-window-background-selected.png", 1.0, 28.0), themeValues = [ @@ -2597,6 +2595,7 @@ var themedButtonValues = nil, [@"menu-window-scroll-indicator-height", 16.0], [@"menu-bar-window-background-color", menuBarWindowBackgroundColor], + [@"menu-bar-window-background-selected-color", menuBarWindowBackgroundSelectedColor], [@"menu-bar-window-font", [CPFont boldSystemFontOfSize:[CPFont systemFontSize]]], [@"menu-bar-window-height", 28.0], [@"menu-bar-window-margin", 10.0], diff --git a/AppKit/Themes/Aristo2/ThemeDescriptors.j b/AppKit/Themes/Aristo2/ThemeDescriptors.j index 8fc9f5cec..25510ebc6 100644 --- a/AppKit/Themes/Aristo2/ThemeDescriptors.j +++ b/AppKit/Themes/Aristo2/ThemeDescriptors.j @@ -2226,11 +2226,8 @@ var themedButtonValues = nil, { var menuItemMenuBarView = [[_CPMenuItemMenuBarView alloc] initWithFrame:CGRectMake(0.0, 0.0, 16.0, 16.0)], - selectionColor = PatternColor(@"menu-bar-window-background-selected.png", 1.0, 28.0), - themeValues = [ - [@"selection-color", selectionColor], [@"submenu-indicator-color", [CPColor grayColor]], [@"menu-item-selection-color", [CPColor colorWithHexString:@"5C85D8"]], [@"menu-item-text-shadow-color", [CPColor colorWithCalibratedRed:26.0 / 255.0 green: 73.0 / 255.0 blue:109.0 / 255.0 alpha:1.0]], @@ -2279,7 +2276,6 @@ var themedButtonValues = nil, { var menuView = [[_CPMenuView alloc] initWithFrame:CGRectMake(0.0, 0.0, 200.0, 100.0)], - menuWindowMoreAboveImage = PatternImage(@"menu-window-more-above.png", 38.0, 18.0), menuWindowMoreBelowImage = PatternImage(@"menu-window-more-below.png", 38.0, 18.0), generalIconNew = PatternImage(@"menu-general-icon-new.png", 16.0, 16.0), @@ -2318,6 +2314,7 @@ var themedButtonValues = nil, ), menuBarWindowBackgroundColor = PatternColor(@"menu-bar-window-background.png", 1.0, 30.0), + menuBarWindowBackgroundSelectedColor = PatternColor(@"menu-bar-window-background-selected.png", 1.0, 30.0), themeValues = [ @@ -2329,6 +2326,7 @@ var themedButtonValues = nil, [@"menu-window-scroll-indicator-height", 16.0], [@"menu-bar-window-background-color", menuBarWindowBackgroundColor], + [@"menu-bar-window-background-selected-color", menuBarWindowBackgroundSelectedColor], [@"menu-bar-window-font", [CPFont boldSystemFontOfSize:[CPFont systemFontSize]]], [@"menu-bar-window-height", 30.0], [@"menu-bar-window-margin", 10.0],