mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-29 23:13:36 +00:00
Previously, the default template generated by capp gen for a new themeDescriptor project was not similar as the themeDescriptor of Aristo1 or 2. This could confuse new developer who would like to create a new theme.
40 lines
942 B
Plaintext
40 lines
942 B
Plaintext
/*
|
|
* ThemeDescriptors.j
|
|
* __project.name__
|
|
*
|
|
* Created by __user.name__ on __project.date__
|
|
* Copyright __project.year__, __organization.name__. All rights reserved.
|
|
*/
|
|
|
|
@import <BlendKit/BKThemeDescriptor.j>
|
|
|
|
|
|
@implementation __project.nameasidentifier__ThemeDescriptor : BKThemeDescriptor
|
|
|
|
+ (CPString)themeName
|
|
{
|
|
return @"__project.name__";
|
|
}
|
|
|
|
+ (CPButton)themedButton
|
|
{
|
|
var button = [[CPButton alloc] initWithFrame:CGRectMake(0.0, 0.0, 100.0, 20.0)];
|
|
|
|
var themedButtonValues =
|
|
[
|
|
[@"text-color", [CPColor redColor]],
|
|
[@"text-color", [CPColor yellowColor], CPThemeStateHighlighted],
|
|
|
|
[@"bezel-color", [CPColor blueColor]],
|
|
[@"bezel-color", [CPColor greenColor], CPThemeStateHighlighted],
|
|
];
|
|
|
|
[self registerThemeValues:themedButtonValues forView:button];
|
|
|
|
[button setTitle:@"Yikes!"];
|
|
|
|
return button;
|
|
}
|
|
|
|
@end
|