Fixed bugs with showcase

This commit is contained in:
Alexandre Wilhelm
2013-05-21 14:10:05 -07:00
parent 14ab582a53
commit 0c613f1dde
3 changed files with 29 additions and 24 deletions
+4 -4
View File
@@ -135,10 +135,10 @@ CPEraDatePickerElementFlag = 0x0100;
@"clock-text-shadow-color": [CPColor clearColor],
@"clock-text-shadow-offset": CGSizeMakeZero(),
@"clock-font": [CPNull null],
@"second-hand-image": [CPColor clearColor],
@"hour-hand-image": [CPColor clearColor],
@"middle-hand-image": [CPColor clearColor],
@"minute-hand-image": [CPColor clearColor],
@"second-hand-image": [CPNull null],
@"hour-hand-image": [CPNull null],
@"middle-hand-image": [CPNull null],
@"minute-hand-image": [CPNull null],
@"size-clock": CGSizeMakeZero(),
@"second-hand-size": CGSizeMakeZero(),
@"hour-hand-size": CGSizeMakeZero(),
+4 -2
View File
@@ -1097,7 +1097,7 @@ var themedButtonValues = nil,
+ (CPDatePicker)themedDatePicker
{
var datePicker = [[CPDatePicker alloc] initWithFrame:CGRectMake(40,140,300,29)],
var datePicker = [[CPDatePicker alloc] initWithFrame:CGRectMake(40,40,170,29)],
bezelColor = PatternColor(
[
@@ -1166,6 +1166,7 @@ var themedButtonValues = nil,
[@"max-size", CGSizeMake(-1.0, 29.0)]
];
[datePicker setDatePickerStyle:CPTextFieldDatePickerStyle];
[self registerThemeValues:themeValues forView:datePicker];
return datePicker;
@@ -1174,7 +1175,7 @@ var themedButtonValues = nil,
+ (CPDatePicker)themedDatePickerCalendar
{
var bundle = [CPBundle mainBundle],
datePicker = [[CPDatePicker alloc] initWithFrame:CGRectMake(40,140,300,29)],
datePicker = [[CPDatePicker alloc] initWithFrame:CGRectMake(40,140,276,148)],
arrowImageLeft = PatternImage("datepicker-calendar-arrow-left.png", 7.0, 10.0),
arrowImageRight = PatternImage("datepicker-calendar-arrow-right.png", 7.0, 10.0),
@@ -1313,6 +1314,7 @@ var themedButtonValues = nil,
];
[datePicker setDatePickerStyle:CPClockAndCalendarDatePickerStyle];
[datePicker setBackgroundColor:[CPColor whiteColor]];
[self registerThemeValues:themeValues forView:datePicker];
return datePicker;
+21 -18
View File
@@ -667,7 +667,7 @@ var themedButtonValues = nil,
+ (CPDatePicker)themedDatePicker
{
var datePicker = [[CPDatePicker alloc] initWithFrame:CGRectMake(40,140,300,29)],
var datePicker = [[CPDatePicker alloc] initWithFrame:CGRectMake(40,40,170,29)],
bezelColor = PatternColor(
"textfield-bezel-square{state}{position}.png",
@@ -719,6 +719,7 @@ var themedButtonValues = nil,
[@"max-size", CGSizeMake(-1.0, 29.0)]
];
[datePicker setDatePickerStyle:CPTextFieldDatePickerStyle];
[self registerThemeValues:themeValues forView:datePicker];
return datePicker;
@@ -726,7 +727,8 @@ var themedButtonValues = nil,
+ (CPDatePicker)themedDatePickerCalendar
{
var datePicker = [[CPDatePicker alloc] initWithFrame:CGRectMake(40,140,300,29)],
var bundle = [CPBundle mainBundle],
datePicker = [[CPDatePicker alloc] initWithFrame:CGRectMake(40,140,276,148)],
arrowImageLeft = PatternImage("datepicker-calendar-arrow-left.png", 7.0, 10.0),
arrowImageRight = PatternImage("datepicker-calendar-arrow-right.png", 7.0, 10.0),
@@ -736,16 +738,16 @@ var themedButtonValues = nil,
arrowImageRightHighlighted = PatternImage("datepicker-calendar-arrow-right-highlighted.png", 7.0, 10.0),
circleImageHighlighted = PatternImage("datepicker-circle-image-highlighted.png", 9.0, 10.0),
secondHandColor = PatternColor("datepicker-clock-second-hand.png", 89.0, 89.0),
minuteHandColor = PatternColor("datepicker-clock-minute-hand.png", 85.0, 85.0),
hourHandColor = PatternColor("datepicker-clock-hour-hand.png", 47.0, 47.0),
middleHandColor = PatternColor("datepicker-clock-middle-hand.png", 13.0, 13.0),
secondHandImage = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"datepicker-clock-second-hand.png"] size:CGSizeMake(89, 89)],
minuteHandImage = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"datepicker-clock-minute-hand.png"] size:CGSizeMake(85, 85)],
hourHandImage = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"datepicker-clock-hour-hand.png"] size:CGSizeMake(47, 47)],
middleHandImage = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"datepicker-clock-middle-hand.png"] size:CGSizeMake(13, 13)],
clockImageColor = PatternColor("datepicker-clock.png", 122.0, 123.0),
secondHandColorDisabled = PatternColor("datepicker-clock-second-hand-disabled.png", 89.0, 89.0),
minuteHandColorDisabled = PatternColor("datepicker-clock-minute-hand-disabled.png", 85.0, 85.0),
hourHandColorDisabled = PatternColor("datepicker-clock-hour-hand-disabled.png", 47.0, 47.0),
middleHandColorDisabled = PatternColor("datepicker-clock-middle-hand-disabled.png", 13.0, 13.0),
secondHandImageDisabled = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"datepicker-clock-second-hand-disabled.png"] size:CGSizeMake(89, 89)],
minuteHandImageDisabled = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"datepicker-clock-minute-hand-disabled.png"] size:CGSizeMake(85, 85)],
hourHandImageDisabled = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"datepicker-clock-hour-hand-disabled.png"] size:CGSizeMake(47, 47)],
middleHandImageDisabled = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"datepicker-clock-middle-hand-disabled.png"] size:CGSizeMake(13, 13)],
clockImageColorDisabled = PatternColor("datepicker-clock-disabled.png", 122.0, 123.0),
themeValues =
@@ -839,15 +841,15 @@ var themedButtonValues = nil,
[@"circle-image-highlighted", circleImageHighlighted],
[@"arrow-inset", CGInsetMake(9.0, 4.0, 0.0, 0.0)],
[@"second-hand-color", secondHandColor],
[@"hour-hand-color", hourHandColor],
[@"middle-hand-color", middleHandColor],
[@"minute-hand-color", minuteHandColor],
[@"second-hand-image", secondHandImage],
[@"hour-hand-image", hourHandImage],
[@"middle-hand-image", middleHandImage],
[@"minute-hand-image", minuteHandImage],
[@"second-hand-color", secondHandColorDisabled, CPThemeStateDisabled],
[@"hour-hand-color", hourHandColorDisabled, CPThemeStateDisabled],
[@"middle-hand-color", middleHandColorDisabled, CPThemeStateDisabled],
[@"minute-hand-color", minuteHandColorDisabled, CPThemeStateDisabled],
[@"second-hand-image", secondHandImageDisabled, CPThemeStateDisabled],
[@"hour-hand-image", hourHandImageDisabled, CPThemeStateDisabled],
[@"middle-hand-image", middleHandImageDisabled, CPThemeStateDisabled],
[@"minute-hand-image", minuteHandImageDisabled, CPThemeStateDisabled],
[@"second-hand-size", CGSizeMake(89.0, 89.0)],
[@"hour-hand-size", CGSizeMake(47.0, 47.0)],
@@ -864,6 +866,7 @@ var themedButtonValues = nil,
];
[datePicker setDatePickerStyle:CPClockAndCalendarDatePickerStyle];
[datePicker setBackgroundColor:[CPColor whiteColor]];
[self registerThemeValues:themeValues forView:datePicker];
return datePicker;