Add theme descriptors for popovers

This commit is contained in:
Antoine Mercadal committed 2013-01-31 15:25:32 -08:00
1 parent 8cbfc79034
commit 6b17cd4d9e
1 file changed
+40
+40
View File
@@ -47,6 +47,7 @@
@import <AppKit/CPTokenField.j>
@import <AppKit/CPWindow.j>
@import <AppKit/_CPToolTip.j>
@import <AppKit/CPPopover.j>
@import <BlendKit/BKThemeDescriptor.j>
@@ -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