mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-28 02:48:49 +00:00
Add theme descriptors for popovers
This commit is contained in:
1 parent
8cbfc79034
commit
6b17cd4d9e
1 file changed
+40
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user