From 6aece1cf8cec2d197041e00968fa21b1d411a0aa Mon Sep 17 00:00:00 2001 From: Alexandre Wilhelm Date: Tue, 3 Mar 2015 22:50:39 -0800 Subject: [PATCH] Fixed: changed default template for the generate ThemeDescriptor 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. --- .../Templates/ThemeDescriptor/ThemeDescriptors.j | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Tools/capp/Resources/Templates/ThemeDescriptor/ThemeDescriptors.j b/Tools/capp/Resources/Templates/ThemeDescriptor/ThemeDescriptors.j index a1b7aa4d9..80113a936 100644 --- a/Tools/capp/Resources/Templates/ThemeDescriptor/ThemeDescriptors.j +++ b/Tools/capp/Resources/Templates/ThemeDescriptor/ThemeDescriptors.j @@ -20,11 +20,16 @@ { var button = [[CPButton alloc] initWithFrame:CGRectMake(0.0, 0.0, 100.0, 20.0)]; - [button setValue:[CPColor blueColor] forThemeAttribute:@"bezel-color"]; - [button setValue:[CPColor greenColor] forThemeAttribute:@"bezel-color" inState:CPThemeStateHighlighted]; + var themedButtonValues = + [ + [@"text-color", [CPColor redColor]], + [@"text-color", [CPColor yellowColor], CPThemeStateHighlighted], - [button setValue:[CPColor redColor] forThemeAttribute:@"text-color"]; - [button setValue:[CPColor yellowColor] forThemeAttribute:@"text-color" inState:CPThemeStateHighlighted]; + [@"bezel-color", [CPColor blueColor]], + [@"bezel-color", [CPColor greenColor], CPThemeStateHighlighted], + ]; + + [self registerThemeValues:themedButtonValues forView:button]; [button setTitle:@"Yikes!"];