From 6b17cd4d9e397d193542fd3ab17908c3a168bb2c Mon Sep 17 00:00:00 2001 From: Antoine Mercadal Date: Thu, 31 Jan 2013 15:25:32 -0800 Subject: [PATCH] Add theme descriptors for popovers --- AppKit/Themes/Aristo/ThemeDescriptors.j | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/AppKit/Themes/Aristo/ThemeDescriptors.j b/AppKit/Themes/Aristo/ThemeDescriptors.j index 106bb8f12..5840eee1a 100755 --- a/AppKit/Themes/Aristo/ThemeDescriptors.j +++ b/AppKit/Themes/Aristo/ThemeDescriptors.j @@ -47,6 +47,7 @@ @import @import @import +@import @import @@ -2688,6 +2689,45 @@ var themedButtonValues = nil, return menuView; } ++ (_CPPopoverWindowView)themedPopoverWindowView +{ + var popoverWindowView = [[_CPPopoverWindowView alloc] initWithFrame:CGRectMake(0, 0, 200, 200) styleMask:nil], + + gradient = CGGradientCreateWithColorComponents( + CGColorSpaceCreateDeviceRGB(), + [ + (254.0 / 255), (254.0 / 255), (254.0 / 255), 0.93, + (231.0 / 255), (231.0 / 255), (231.0 / 255), 0.93 + ], + [0, 1], + 2 + ), + + gradientHUD = CGGradientCreateWithColorComponents( + CGColorSpaceCreateDeviceRGB(), + [ + (38.0 / 255), (38.0 / 255), (38.0 / 255), 0.93, + (18.0 / 255), (18.0 / 255), (18.0 / 255), 0.93 + ], + [0, 1], + 2), + + strokeColor = [CPColor colorWithHexString:@"B8B8B8"], + strokeColorHUD = [CPColor colorWithHexString:@"222222"], + + themeValues = + [ + [@"background-gradient", gradient], + [@"background-gradient-hud", gradientHUD], + [@"stroke-color", strokeColor], + [@"stroke-color-hud", strokeColorHUD] + ]; + + [self registerThemeValues:themeValues forView:popoverWindowView]; + + return popoverWindowView; +} + @end