Merge branch 'themeable-rule-editor' of https://github.com/t00f/cappuccino into themeable-rule-editor

This commit is contained in:
Antoine Mercadal
2014-08-14 21:03:45 -07:00
50 changed files with 3875 additions and 6116 deletions
+1
View File
@@ -5,6 +5,7 @@ Demos
./Aristo
WebSite
.push-package
*.xcodeproj*
*.xcodeproj/*.pbxuser
*.xcodeproj/*.perspectivev3
xcuserdata/
+14 -3
View File
@@ -108,7 +108,6 @@ CPButtonImageOffset = 3.0;
// NS-style Display Properties
CPBezelStyle _bezelStyle;
CPControlSize _controlSize;
CPString _keyEquivalent;
unsigned _keyEquivalentModifierMask;
@@ -189,8 +188,6 @@ CPButtonImageOffset = 3.0;
- (void)_init
{
_controlSize = CPRegularControlSize;
_keyEquivalent = @"";
_keyEquivalentModifierMask = 0;
@@ -201,6 +198,20 @@ CPButtonImageOffset = 3.0;
[self setButtonType:CPMomentaryPushInButton];
}
#pragma mark -
#pragma mark Control Size
- (void)setControlSize:(CPControlSize)aControlSize
{
[super setControlSize:aControlSize];
if ([self isBordered])
[self _sizeToControlSize];
}
#pragma mark -
// Setting the state
/*!
Returns a Boolean value indicating whether the button allows a mixed state.
+86 -6
View File
@@ -118,6 +118,8 @@ var CPControlBlackColor = [CPColor blackColor];
BOOL _trackingWasWithinFrame;
unsigned _trackingMouseDownFlags;
CGPoint _previousTrackingLocation;
CPControlSize _controlSize;
}
+ (CPDictionary)themeAttributes
@@ -134,6 +136,7 @@ var CPControlBlackColor = [CPColor blackColor];
@"image-scaling": CPScaleToFit,
@"min-size": CGSizeMakeZero(),
@"max-size": CGSizeMake(-1.0, -1.0),
@"nib2cib-adjustment-frame" : CGRectMakeZero(),
};
}
@@ -189,13 +192,85 @@ var CPControlBlackColor = [CPColor blackColor];
if (self)
{
_sendActionOn = CPLeftMouseUpMask;
_sendActionOn = CPLeftMouseUpMask;
_trackingMouseDownFlags = 0;
}
return self;
}
#pragma mark -
#pragma mark Control Size
/*!
Returns the control's control size
*/
- (CPControlSize)controlSize
{
return _controlSize;
}
/*!
Sets the control's size.
@param aControlSize the control's size
*/
- (void)setControlSize:(CPControlSize)aControlSize
{
if (_controlSize === aControlSize)
return;
[self unsetThemeState:[self _controlSizeThemeState]];
_controlSize = aControlSize;
[self setThemeState:[self _controlSizeThemeState]];
[self setNeedsLayout];
[self setNeedsDisplay:YES];
}
/*!
Gets the current theme state according to the current controlSize.
@return a CPThemeState
*/
- (ThemeState)_controlSizeThemeState
{
switch(_controlSize)
{
case CPSmallControlSize:
return CPThemeStateControlSizeSmall;
case CPMiniControlSize:
return CPThemeStateControlSizeMini;
case CPRegularControlSize:
default:
return CPThemeStateControlSizeRegular;
}
}
/*!
@ignore
Change frame size according to the theme control size theme constraints
Basically for height to min-size.
*/
- (void)_sizeToControlSize
{
var frameSize = [self frameSize],
minSize = [self currentValueForThemeAttribute:@"min-size"],
maxSize = [self currentValueForThemeAttribute:@"max-size"];
if (minSize.width > 0)
frameSize.width = MAX(minSize.width, frameSize.width);
if (minSize.height > 0)
frameSize.height = minSize.height;
[self setFrameSize:frameSize];
}
#pragma mark -
/*!
Sets the receiver's target action.
@@ -927,14 +1002,15 @@ var CPControlBlackColor = [CPColor blackColor];
@end
var CPControlValueKey = @"CPControlValueKey",
var CPControlActionKey = @"CPControlActionKey",
CPControlControlSizeKey = @"CPControlControlSizeKey",
CPControlControlStateKey = @"CPControlControlStateKey",
CPControlIsEnabledKey = @"CPControlIsEnabledKey",
CPControlTargetKey = @"CPControlTargetKey",
CPControlActionKey = @"CPControlActionKey",
CPControlSendActionOnKey = @"CPControlSendActionOnKey",
CPControlFormatterKey = @"CPControlFormatterKey",
CPControlIsEnabledKey = @"CPControlIsEnabledKey",
CPControlSendActionOnKey = @"CPControlSendActionOnKey",
CPControlSendsActionOnEndEditingKey = @"CPControlSendsActionOnEndEditingKey",
CPControlTargetKey = @"CPControlTargetKey",
CPControlValueKey = @"CPControlValueKey",
__Deprecated__CPImageViewImageKey = @"CPImageViewImageKey";
@@ -961,6 +1037,8 @@ var CPControlValueKey = @"CPControlValueKey",
[self setSendsActionOnEndEditing:[aCoder decodeBoolForKey:CPControlSendsActionOnEndEditingKey]];
[self setFormatter:[aCoder decodeObjectForKey:CPControlFormatterKey]];
[self setControlSize:[aCoder decodeIntForKey:CPControlControlSizeKey]];
}
return self;
@@ -993,6 +1071,8 @@ var CPControlValueKey = @"CPControlValueKey",
if (_formatter !== nil)
[aCoder encodeObject:_formatter forKey:CPControlFormatterKey];
[aCoder encodeInt:_controlSize forKey:CPControlControlSizeKey];
}
@end
+23 -3
View File
@@ -28,7 +28,6 @@
@import <Foundation/CPArray.j>
@import <Foundation/CPObject.j>
@import <Foundation/CPDate.j>
@import <Foundation/CPDateFormatter.j>
@import <Foundation/CPLocale.j>
@import <Foundation/CPTimeZone.j>
@@ -224,6 +223,18 @@ CPEraDatePickerElementFlag = 0x0100;
}
#pragma mark -
#pragma mark Control Size
- (void)setControlSize:(CPControlSize)aControlSize
{
[super setControlSize:aControlSize];
if ([self datePickerStyle] == CPTextFieldAndStepperDatePickerStyle || [self datePickerStyle] == CPTextFieldDatePickerStyle)
[self _sizeToControlSize];
}
#pragma mark -
#pragma mark Delegate methods
@@ -248,12 +259,14 @@ CPEraDatePickerElementFlag = 0x0100;
*/
- (void)layoutSubviews
{
[super layoutSubviews];
if (_datePickerStyle == CPTextFieldAndStepperDatePickerStyle || _datePickerStyle == CPTextFieldDatePickerStyle)
{
[_datePickerTextfield setHidden:NO];
[_datePickerCalendar setHidden:YES];
[_datePickerTextfield setControlSize:[self controlSize]];
[_datePickerTextfield setNeedsLayout];
}
else
@@ -275,11 +288,14 @@ CPEraDatePickerElementFlag = 0x0100;
return _dateValue
}
/*! Set the objectValue ofhe datePier. It has to be a CPDate
/*! Set the objectValue of the datePicker. It has to be a CPDate
@param aDateValue the dateValue
*/
- (void)setObjectValue:(CPDate)aValue
{
if (![aValue isKindOfClass:[CPDate class]])
return;
[self setDateValue:aValue];
}
@@ -377,6 +393,8 @@ CPEraDatePickerElementFlag = 0x0100;
{
_datePickerStyle = aDatePickerStyle;
[self setControlSize:[self controlSize]];
[self setNeedsDisplay:YES];
[self setNeedsLayout];
}
@@ -537,6 +555,7 @@ CPEraDatePickerElementFlag = 0x0100;
return NO;
[_datePickerTextfield _selectTextFieldWithFlags:[[CPApp currentEvent] modifierFlags]];
return YES;
}
@@ -644,12 +663,13 @@ var CPDatePickerModeKey = @"CPDatePickerModeKey",
_timeInterval = [aCoder decodeDoubleForKey:CPIntervalKey];
_datePickerMode = [aCoder decodeIntForKey:CPDatePickerModeKey];
_datePickerElements = [aCoder decodeIntForKey:CPDatePickerElementsKey];
_datePickerStyle = [aCoder decodeIntForKey:CPDatePickerStyleKey];
[self setDatePickerStyle: [aCoder decodeIntForKey:CPDatePickerStyleKey]];
_locale = [aCoder decodeObjectForKey:CPLocaleKey];
_dateValue = [aCoder decodeObjectForKey:CPDateValueKey];
_backgroundColor = [aCoder decodeObjectForKey:CPBackgroundColorKey];
_drawsBackground = [aCoder decodeBoolForKey:CPDrawsBackgroundKey];
_isBordered = [aCoder decodeBoolForKey:CPBorderedKey];
[self _init];
}
+212 -170
View File
@@ -384,14 +384,16 @@ var CPZeroKeyCode = 48,
// Check the mode to display or not the stepper
if ([_datePicker datePickerStyle] == CPTextFieldAndStepperDatePickerStyle)
{
frameSize = CGSizeMake(CGRectGetWidth([_datePicker frame]) - CGRectGetWidth([_stepper frame]) - [_datePicker valueForThemeAttribute:@"stepper-margin"], CGRectGetHeight([_datePicker frame]));
[_stepper setHidden:NO];
[_stepper setControlSize:[_datePicker controlSize]];
frameSize = CGSizeMake(CGRectGetWidth([_datePicker frame]) - CGRectGetWidth([_stepper frame]) - [_datePicker currentValueForThemeAttribute:@"stepper-margin"], CGRectGetHeight([_datePicker frame]));
frameSize.width -= bezelInset.left;
frameSize.height -= bezelInset.top + bezelInset.bottom;
[_datePickerElementView setFrameSize:frameSize];
[_datePickerElementView setFrameOrigin:CGPointMake(bezelInset.left, bezelInset.top)];
[_stepper setHidden:NO];
}
else if ([_datePicker datePickerStyle] == CPTextFieldDatePickerStyle)
{
@@ -405,7 +407,9 @@ var CPZeroKeyCode = 48,
[_stepper setHidden:YES];
}
[_stepper setFrameOrigin:CGPointMake(CGRectGetMaxX([_datePickerElementView frame]) + [_datePicker valueForThemeAttribute:@"stepper-margin"], bezelInset.top + CGRectGetHeight([_datePickerElementView frame]) / 2 - CGRectGetHeight([_stepper frame]) / 2)];
[_stepper setFrameOrigin:CGPointMake(CGRectGetMaxX([_datePickerElementView frame]) + [_datePicker currentValueForThemeAttribute:@"stepper-margin"], bezelInset.top + CGRectGetHeight([_datePickerElementView frame]) / 2 - CGRectGetHeight([_stepper frame]) / 2)];
[_datePickerElementView setControlSize:[_datePicker controlSize]];
[_datePickerElementView setNeedsLayout];
}
@@ -702,6 +706,7 @@ var CPZeroKeyCode = 48,
[self _updateResponderTextField];
[self _updateHiddenTextFields];
[self _setControlSizes];
[self _sizeToFit];
[self _updatePositions];
@@ -738,183 +743,201 @@ var CPZeroKeyCode = 48,
*/
- (void)_themeTextFields
{
[_textFieldDay setValue:[_datePicker valueForThemeAttribute:@"min-size-datepicker-textfield"] forThemeAttribute:@"min-size"];
[_textFieldDay setValue:[_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield" inState:CPThemeStateNormal] forThemeAttribute:@"content-inset" inState:CPThemeStateNormal];
[_textFieldDay setValue:[_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield" inState:CPThemeStateSelected] forThemeAttribute:@"content-inset" inState:CPThemeStateSelected];
[_textFieldDay setValue:[_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateSelected] forThemeAttribute:@"bezel-color" inState:CPThemeStateSelected];
[_textFieldDay setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateSelected];
[_textFieldDay setValue:[_datePicker valueForThemeAttribute:@"text-color" inState:CPThemeStateSelected] forThemeAttribute:@"text-color" inState:CPThemeStateSelected];
[_textFieldDay setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateSelected] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateSelected];
[_textFieldDay setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateSelected] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateSelected];
[_textFieldDay setValue:[_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateNormal] forThemeAttribute:@"bezel-color" inState:CPThemeStateNormal];
[_textFieldDay setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_textFieldDay setValue:[_datePicker textColor] forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_textFieldDay setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_textFieldDay setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal];
[_textFieldDay setValue:[_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateDisabled] forThemeAttribute:@"bezel-color" inState:CPThemeStateDisabled];
[_textFieldDay setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateDisabled];
[_textFieldDay setValue:[_datePicker valueForThemeAttribute:@"text-color" inState:CPThemeStateDisabled] forThemeAttribute:@"text-color" inState:CPThemeStateDisabled];
[_textFieldDay setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled];
[_textFieldDay setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled];
var disabledTextColor = [_datePicker valueForThemeAttribute:@"text-color" inState:CPThemeStateDisabled],
disabledTextFieldBezelColor = [_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateDisabled],
disabledTextShadowColor = [_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled],
disabledTextShadowOffset = [_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled],
normalSeparatorContentInset = [_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield-separator" inState:CPThemeStateNormal],
normalTextFieldBezelColor = [_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateNormal],
normalTextFieldContentInset = [_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield" inState:CPThemeStateNormal],
normalTextShadowColor = [_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal],
normalTextShadowOffset = [_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal],
selectedSeparatorContentInset = [_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield-separator" inState:CPThemeStateSelected],
selectedTextColor = [_datePicker valueForThemeAttribute:@"text-color" inState:CPThemeStateSelected],
selectedTextFieldBezelColor = [_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateSelected],
selectedTextFieldContentInset = [_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield" inState:CPThemeStateSelected],
selectedTextShadowColor = [_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateSelected],
selectedTextShadowOffset = [_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateSelected],
textColor = [_datePicker textColor],
textFieldMinSize = [_datePicker currentValueForThemeAttribute:@"min-size-datepicker-textfield"],
textFont = [_datePicker textFont];
[_textFieldMonth setValue:[_datePicker valueForThemeAttribute:@"min-size-datepicker-textfield"] forThemeAttribute:@"min-size"];
[_textFieldMonth setValue:[_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield" inState:CPThemeStateNormal] forThemeAttribute:@"content-inset" inState:CPThemeStateNormal];
[_textFieldMonth setValue:[_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield" inState:CPThemeStateSelected] forThemeAttribute:@"content-inset" inState:CPThemeStateSelected];
[_textFieldMonth setValue:[_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateSelected] forThemeAttribute:@"bezel-color" inState:CPThemeStateSelected];
[_textFieldMonth setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateSelected];
[_textFieldMonth setValue:[_datePicker valueForThemeAttribute:@"text-color" inState:CPThemeStateSelected] forThemeAttribute:@"text-color" inState:CPThemeStateSelected];
[_textFieldMonth setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateSelected] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateSelected];
[_textFieldMonth setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateSelected] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateSelected];
[_textFieldMonth setValue:[_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateNormal] forThemeAttribute:@"bezel-color" inState:CPThemeStateNormal];
[_textFieldMonth setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_textFieldMonth setValue:[_datePicker textColor] forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_textFieldMonth setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_textFieldMonth setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal];
[_textFieldMonth setValue:[_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateDisabled] forThemeAttribute:@"bezel-color" inState:CPThemeStateDisabled];
[_textFieldMonth setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateDisabled];
[_textFieldMonth setValue:[_datePicker valueForThemeAttribute:@"text-color" inState:CPThemeStateDisabled] forThemeAttribute:@"text-color" inState:CPThemeStateDisabled];
[_textFieldMonth setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled];
[_textFieldMonth setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled];
[_textFieldDay setValue:textFieldMinSize forThemeAttribute:@"min-size"];
[_textFieldDay setValue:normalTextFieldContentInset forThemeAttribute:@"content-inset" inState:CPThemeStateNormal];
[_textFieldDay setValue:selectedTextFieldContentInset forThemeAttribute:@"content-inset" inState:CPThemeStateSelected];
[_textFieldDay setValue:selectedTextFieldBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateSelected];
[_textFieldDay setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateSelected];
[_textFieldDay setValue:selectedTextColor forThemeAttribute:@"text-color" inState:CPThemeStateSelected];
[_textFieldDay setValue:selectedTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateSelected];
[_textFieldDay setValue:selectedTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateSelected];
[_textFieldDay setValue:normalTextFieldBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateNormal];
[_textFieldDay setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_textFieldDay setValue:textColor forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_textFieldDay setValue:normalTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_textFieldDay setValue:normalTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal];
[_textFieldDay setValue:disabledTextFieldBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateDisabled];
[_textFieldDay setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateDisabled];
[_textFieldDay setValue:disabledTextColor forThemeAttribute:@"text-color" inState:CPThemeStateDisabled];
[_textFieldDay setValue:disabledTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled];
[_textFieldDay setValue:disabledTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled];
[_textFieldYear setValue:[_datePicker valueForThemeAttribute:@"min-size-datepicker-textfield"] forThemeAttribute:@"min-size"];
[_textFieldYear setValue:[_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield" inState:CPThemeStateNormal] forThemeAttribute:@"content-inset" inState:CPThemeStateNormal];
[_textFieldYear setValue:[_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield" inState:CPThemeStateSelected] forThemeAttribute:@"content-inset" inState:CPThemeStateSelected];
[_textFieldYear setValue:[_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateSelected] forThemeAttribute:@"bezel-color" inState:CPThemeStateSelected];
[_textFieldYear setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateSelected];
[_textFieldYear setValue:[_datePicker valueForThemeAttribute:@"text-color" inState:CPThemeStateSelected] forThemeAttribute:@"text-color" inState:CPThemeStateSelected];
[_textFieldYear setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateSelected] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateSelected];
[_textFieldYear setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateSelected] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateSelected];
[_textFieldYear setValue:[_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateNormal] forThemeAttribute:@"bezel-color" inState:CPThemeStateNormal];
[_textFieldYear setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_textFieldYear setValue:[_datePicker textColor] forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_textFieldYear setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_textFieldYear setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal];
[_textFieldYear setValue:[_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateDisabled] forThemeAttribute:@"bezel-color" inState:CPThemeStateDisabled];
[_textFieldYear setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateDisabled];
[_textFieldYear setValue:[_datePicker valueForThemeAttribute:@"text-color" inState:CPThemeStateDisabled] forThemeAttribute:@"text-color" inState:CPThemeStateDisabled];
[_textFieldYear setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled];
[_textFieldYear setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled];
[_textFieldMonth setValue:textFieldMinSize forThemeAttribute:@"min-size"];
[_textFieldMonth setValue:normalTextFieldContentInset forThemeAttribute:@"content-inset" inState:CPThemeStateNormal];
[_textFieldMonth setValue:selectedTextFieldContentInset forThemeAttribute:@"content-inset" inState:CPThemeStateSelected];
[_textFieldMonth setValue:selectedTextFieldBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateSelected];
[_textFieldMonth setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateSelected];
[_textFieldMonth setValue:selectedTextColor forThemeAttribute:@"text-color" inState:CPThemeStateSelected];
[_textFieldMonth setValue:selectedTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateSelected];
[_textFieldMonth setValue:selectedTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateSelected];
[_textFieldMonth setValue:normalTextFieldBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateNormal];
[_textFieldMonth setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_textFieldMonth setValue:textColor forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_textFieldMonth setValue:normalTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_textFieldMonth setValue:normalTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal];
[_textFieldMonth setValue:disabledTextFieldBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateDisabled];
[_textFieldMonth setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateDisabled];
[_textFieldMonth setValue:disabledTextColor forThemeAttribute:@"text-color" inState:CPThemeStateDisabled];
[_textFieldMonth setValue:disabledTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled];
[_textFieldMonth setValue:disabledTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled];
[_textFieldHour setValue:[_datePicker valueForThemeAttribute:@"min-size-datepicker-textfield"] forThemeAttribute:@"min-size"];
[_textFieldHour setValue:[_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield" inState:CPThemeStateNormal] forThemeAttribute:@"content-inset" inState:CPThemeStateNormal];
[_textFieldHour setValue:[_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield" inState:CPThemeStateSelected] forThemeAttribute:@"content-inset" inState:CPThemeStateSelected];
[_textFieldHour setValue:[_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateSelected] forThemeAttribute:@"bezel-color" inState:CPThemeStateSelected];
[_textFieldHour setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateSelected];
[_textFieldHour setValue:[_datePicker valueForThemeAttribute:@"text-color" inState:CPThemeStateSelected] forThemeAttribute:@"text-color" inState:CPThemeStateSelected];
[_textFieldHour setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateSelected] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateSelected];
[_textFieldHour setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateSelected] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateSelected];
[_textFieldHour setValue:[_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateNormal] forThemeAttribute:@"bezel-color" inState:CPThemeStateNormal];
[_textFieldHour setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_textFieldHour setValue:[_datePicker textColor] forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_textFieldHour setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_textFieldHour setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal];
[_textFieldHour setValue:[_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateDisabled] forThemeAttribute:@"bezel-color" inState:CPThemeStateDisabled];
[_textFieldHour setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateDisabled];
[_textFieldHour setValue:[_datePicker valueForThemeAttribute:@"text-color" inState:CPThemeStateDisabled] forThemeAttribute:@"text-color" inState:CPThemeStateDisabled];
[_textFieldHour setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled];
[_textFieldHour setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled];
[_textFieldYear setValue:textFieldMinSize forThemeAttribute:@"min-size"];
[_textFieldYear setValue:normalTextFieldContentInset forThemeAttribute:@"content-inset" inState:CPThemeStateNormal];
[_textFieldYear setValue:selectedTextFieldContentInset forThemeAttribute:@"content-inset" inState:CPThemeStateSelected];
[_textFieldYear setValue:selectedTextFieldBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateSelected];
[_textFieldYear setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateSelected];
[_textFieldYear setValue:selectedTextColor forThemeAttribute:@"text-color" inState:CPThemeStateSelected];
[_textFieldYear setValue:selectedTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateSelected];
[_textFieldYear setValue:selectedTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateSelected];
[_textFieldYear setValue:normalTextFieldBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateNormal];
[_textFieldYear setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_textFieldYear setValue:textColor forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_textFieldYear setValue:normalTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_textFieldYear setValue:normalTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal];
[_textFieldYear setValue:disabledTextFieldBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateDisabled];
[_textFieldYear setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateDisabled];
[_textFieldYear setValue:disabledTextColor forThemeAttribute:@"text-color" inState:CPThemeStateDisabled];
[_textFieldYear setValue:disabledTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled];
[_textFieldYear setValue:disabledTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled];
[_textFieldMinute setValue:[_datePicker valueForThemeAttribute:@"min-size-datepicker-textfield"] forThemeAttribute:@"min-size"];
[_textFieldMinute setValue:[_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield" inState:CPThemeStateNormal] forThemeAttribute:@"content-inset" inState:CPThemeStateNormal];
[_textFieldMinute setValue:[_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield" inState:CPThemeStateSelected] forThemeAttribute:@"content-inset" inState:CPThemeStateSelected];
[_textFieldMinute setValue:[_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateSelected] forThemeAttribute:@"bezel-color" inState:CPThemeStateSelected];
[_textFieldMinute setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateSelected];
[_textFieldMinute setValue:[_datePicker valueForThemeAttribute:@"text-color" inState:CPThemeStateSelected] forThemeAttribute:@"text-color" inState:CPThemeStateSelected];
[_textFieldMinute setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateSelected] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateSelected];
[_textFieldMinute setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateSelected] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateSelected];
[_textFieldMinute setValue:[_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateNormal] forThemeAttribute:@"bezel-color" inState:CPThemeStateNormal];
[_textFieldMinute setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_textFieldMinute setValue:[_datePicker textColor] forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_textFieldMinute setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_textFieldMinute setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal];
[_textFieldMinute setValue:[_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateDisabled] forThemeAttribute:@"bezel-color" inState:CPThemeStateDisabled];
[_textFieldMinute setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateDisabled];
[_textFieldMinute setValue:[_datePicker valueForThemeAttribute:@"text-color" inState:CPThemeStateDisabled] forThemeAttribute:@"text-color" inState:CPThemeStateDisabled];
[_textFieldMinute setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled];
[_textFieldMinute setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled];
[_textFieldHour setValue:textFieldMinSize forThemeAttribute:@"min-size"];
[_textFieldHour setValue:normalTextFieldContentInset forThemeAttribute:@"content-inset" inState:CPThemeStateNormal];
[_textFieldHour setValue:selectedTextFieldContentInset forThemeAttribute:@"content-inset" inState:CPThemeStateSelected];
[_textFieldHour setValue:selectedTextFieldBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateSelected];
[_textFieldHour setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateSelected];
[_textFieldHour setValue:selectedTextColor forThemeAttribute:@"text-color" inState:CPThemeStateSelected];
[_textFieldHour setValue:selectedTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateSelected];
[_textFieldHour setValue:selectedTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateSelected];
[_textFieldHour setValue:normalTextFieldBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateNormal];
[_textFieldHour setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_textFieldHour setValue:textColor forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_textFieldHour setValue:normalTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_textFieldHour setValue:normalTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal];
[_textFieldHour setValue:disabledTextFieldBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateDisabled];
[_textFieldHour setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateDisabled];
[_textFieldHour setValue:disabledTextColor forThemeAttribute:@"text-color" inState:CPThemeStateDisabled];
[_textFieldHour setValue:disabledTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled];
[_textFieldHour setValue:disabledTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled];
[_textFieldSecond setValue:[_datePicker valueForThemeAttribute:@"min-size-datepicker-textfield"] forThemeAttribute:@"min-size"];
[_textFieldSecond setValue:[_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield" inState:CPThemeStateNormal] forThemeAttribute:@"content-inset" inState:CPThemeStateNormal];
[_textFieldSecond setValue:[_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield" inState:CPThemeStateSelected] forThemeAttribute:@"content-inset" inState:CPThemeStateSelected];
[_textFieldSecond setValue:[_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateSelected] forThemeAttribute:@"bezel-color" inState:CPThemeStateSelected];
[_textFieldSecond setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateSelected];
[_textFieldSecond setValue:[_datePicker valueForThemeAttribute:@"text-color" inState:CPThemeStateSelected] forThemeAttribute:@"text-color" inState:CPThemeStateSelected];
[_textFieldSecond setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateSelected] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateSelected];
[_textFieldSecond setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateSelected] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateSelected];
[_textFieldSecond setValue:[_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateNormal] forThemeAttribute:@"bezel-color" inState:CPThemeStateNormal];
[_textFieldSecond setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_textFieldSecond setValue:[_datePicker textColor] forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_textFieldSecond setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_textFieldSecond setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal];
[_textFieldSecond setValue:[_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateDisabled] forThemeAttribute:@"bezel-color" inState:CPThemeStateDisabled];
[_textFieldSecond setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateDisabled];
[_textFieldSecond setValue:[_datePicker valueForThemeAttribute:@"text-color" inState:CPThemeStateDisabled] forThemeAttribute:@"text-color" inState:CPThemeStateDisabled];
[_textFieldSecond setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled];
[_textFieldSecond setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled];
[_textFieldMinute setValue:textFieldMinSize forThemeAttribute:@"min-size"];
[_textFieldMinute setValue:normalTextFieldContentInset forThemeAttribute:@"content-inset" inState:CPThemeStateNormal];
[_textFieldMinute setValue:selectedTextFieldContentInset forThemeAttribute:@"content-inset" inState:CPThemeStateSelected];
[_textFieldMinute setValue:selectedTextFieldBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateSelected];
[_textFieldMinute setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateSelected];
[_textFieldMinute setValue:selectedTextColor forThemeAttribute:@"text-color" inState:CPThemeStateSelected];
[_textFieldMinute setValue:selectedTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateSelected];
[_textFieldMinute setValue:selectedTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateSelected];
[_textFieldMinute setValue:normalTextFieldBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateNormal];
[_textFieldMinute setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_textFieldMinute setValue:textColor forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_textFieldMinute setValue:normalTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_textFieldMinute setValue:normalTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal];
[_textFieldMinute setValue:disabledTextFieldBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateDisabled];
[_textFieldMinute setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateDisabled];
[_textFieldMinute setValue:disabledTextColor forThemeAttribute:@"text-color" inState:CPThemeStateDisabled];
[_textFieldMinute setValue:disabledTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled];
[_textFieldMinute setValue:disabledTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled];
[_textFieldPMAM setValue:[_datePicker valueForThemeAttribute:@"min-size-datepicker-textfield"] forThemeAttribute:@"min-size"];
[_textFieldPMAM setValue:[_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield" inState:CPThemeStateNormal] forThemeAttribute:@"content-inset" inState:CPThemeStateNormal];
[_textFieldPMAM setValue:[_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield" inState:CPThemeStateSelected] forThemeAttribute:@"content-inset" inState:CPThemeStateSelected];
[_textFieldPMAM setValue:[_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateSelected] forThemeAttribute:@"bezel-color" inState:CPThemeStateSelected];
[_textFieldPMAM setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateSelected];
[_textFieldPMAM setValue:[_datePicker valueForThemeAttribute:@"text-color" inState:CPThemeStateSelected] forThemeAttribute:@"text-color" inState:CPThemeStateSelected];
[_textFieldPMAM setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateSelected] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateSelected];
[_textFieldPMAM setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateSelected] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateSelected];
[_textFieldPMAM setValue:[_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateNormal] forThemeAttribute:@"bezel-color" inState:CPThemeStateNormal];
[_textFieldPMAM setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_textFieldPMAM setValue:[_datePicker textColor] forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_textFieldPMAM setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_textFieldPMAM setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal];
[_textFieldPMAM setValue:[_datePicker valueForThemeAttribute:@"datepicker-textfield-bezel-color" inState:CPThemeStateDisabled] forThemeAttribute:@"bezel-color" inState:CPThemeStateDisabled];
[_textFieldPMAM setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateDisabled];
[_textFieldPMAM setValue:[_datePicker valueForThemeAttribute:@"text-color" inState:CPThemeStateDisabled] forThemeAttribute:@"text-color" inState:CPThemeStateDisabled];
[_textFieldPMAM setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled];
[_textFieldPMAM setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled];
[_textFieldSecond setValue:textFieldMinSize forThemeAttribute:@"min-size"];
[_textFieldSecond setValue:normalTextFieldContentInset forThemeAttribute:@"content-inset" inState:CPThemeStateNormal];
[_textFieldSecond setValue:selectedTextFieldContentInset forThemeAttribute:@"content-inset" inState:CPThemeStateSelected];
[_textFieldSecond setValue:selectedTextFieldBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateSelected];
[_textFieldSecond setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateSelected];
[_textFieldSecond setValue:selectedTextColor forThemeAttribute:@"text-color" inState:CPThemeStateSelected];
[_textFieldSecond setValue:selectedTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateSelected];
[_textFieldSecond setValue:selectedTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateSelected];
[_textFieldSecond setValue:normalTextFieldBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateNormal];
[_textFieldSecond setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_textFieldSecond setValue:textColor forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_textFieldSecond setValue:normalTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_textFieldSecond setValue:normalTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal];
[_textFieldSecond setValue:disabledTextFieldBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateDisabled];
[_textFieldSecond setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateDisabled];
[_textFieldSecond setValue:disabledTextColor forThemeAttribute:@"text-color" inState:CPThemeStateDisabled];
[_textFieldSecond setValue:disabledTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled];
[_textFieldSecond setValue:disabledTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled];
[_textFieldSeparatorOne setValue:[_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield-separator" inState:CPThemeStateNormal] forThemeAttribute:@"content-inset" inState:CPThemeStateNormal];
[_textFieldSeparatorOne setValue:[_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield-separator" inState:CPThemeStateSelected] forThemeAttribute:@"content-inset" inState:CPThemeStateSelected];
[_textFieldSeparatorOne setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_textFieldSeparatorOne setValue:[_datePicker textColor] forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_textFieldSeparatorOne setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_textFieldSeparatorOne setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal];
[_textFieldSeparatorOne setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateDisabled];
[_textFieldSeparatorOne setValue:[_datePicker valueForThemeAttribute:@"text-color" inState:CPThemeStateDisabled] forThemeAttribute:@"text-color" inState:CPThemeStateDisabled];
[_textFieldSeparatorOne setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled];
[_textFieldSeparatorOne setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled];
[_textFieldPMAM setValue:textFieldMinSize forThemeAttribute:@"min-size"];
[_textFieldPMAM setValue:normalTextFieldContentInset forThemeAttribute:@"content-inset" inState:CPThemeStateNormal];
[_textFieldPMAM setValue:selectedTextFieldContentInset forThemeAttribute:@"content-inset" inState:CPThemeStateSelected];
[_textFieldPMAM setValue:selectedTextFieldBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateSelected];
[_textFieldPMAM setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateSelected];
[_textFieldPMAM setValue:selectedTextColor forThemeAttribute:@"text-color" inState:CPThemeStateSelected];
[_textFieldPMAM setValue:selectedTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateSelected];
[_textFieldPMAM setValue:selectedTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateSelected];
[_textFieldPMAM setValue:normalTextFieldBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateNormal];
[_textFieldPMAM setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_textFieldPMAM setValue:textColor forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_textFieldPMAM setValue:normalTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_textFieldPMAM setValue:normalTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal];
[_textFieldPMAM setValue:disabledTextFieldBezelColor forThemeAttribute:@"bezel-color" inState:CPThemeStateDisabled];
[_textFieldPMAM setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateDisabled];
[_textFieldPMAM setValue:disabledTextColor forThemeAttribute:@"text-color" inState:CPThemeStateDisabled];
[_textFieldPMAM setValue:disabledTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled];
[_textFieldPMAM setValue:disabledTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled];
[_textFieldSeparatorTwo setValue:[_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield-separator" inState:CPThemeStateNormal] forThemeAttribute:@"content-inset" inState:CPThemeStateNormal];
[_textFieldSeparatorTwo setValue:[_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield-separator" inState:CPThemeStateSelected] forThemeAttribute:@"content-inset" inState:CPThemeStateSelected];
[_textFieldSeparatorTwo setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_textFieldSeparatorTwo setValue:[_datePicker textColor] forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_textFieldSeparatorTwo setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_textFieldSeparatorTwo setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal];
[_textFieldSeparatorTwo setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateDisabled];
[_textFieldSeparatorTwo setValue:[_datePicker valueForThemeAttribute:@"text-color" inState:CPThemeStateDisabled] forThemeAttribute:@"text-color" inState:CPThemeStateDisabled];
[_textFieldSeparatorTwo setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled];
[_textFieldSeparatorTwo setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled];
[_textFieldSeparatorOne setValue:normalSeparatorContentInset forThemeAttribute:@"content-inset" inState:CPThemeStateNormal];
[_textFieldSeparatorOne setValue:selectedSeparatorContentInset forThemeAttribute:@"content-inset" inState:CPThemeStateSelected];
[_textFieldSeparatorOne setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_textFieldSeparatorOne setValue:textColor forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_textFieldSeparatorOne setValue:normalTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_textFieldSeparatorOne setValue:normalTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal];
[_textFieldSeparatorOne setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateDisabled];
[_textFieldSeparatorOne setValue:disabledTextColor forThemeAttribute:@"text-color" inState:CPThemeStateDisabled];
[_textFieldSeparatorOne setValue:disabledTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled];
[_textFieldSeparatorOne setValue:disabledTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled];
[_textFieldSeparatorThree setValue:[_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield-separator" inState:CPThemeStateNormal] forThemeAttribute:@"content-inset" inState:CPThemeStateNormal];
[_textFieldSeparatorThree setValue:[_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield-separator" inState:CPThemeStateSelected] forThemeAttribute:@"content-inset" inState:CPThemeStateSelected];
[_textFieldSeparatorThree setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_textFieldSeparatorThree setValue:[_datePicker textColor] forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_textFieldSeparatorThree setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_textFieldSeparatorThree setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal];
[_textFieldSeparatorThree setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateDisabled];
[_textFieldSeparatorThree setValue:[_datePicker valueForThemeAttribute:@"text-color" inState:CPThemeStateDisabled] forThemeAttribute:@"text-color" inState:CPThemeStateDisabled];
[_textFieldSeparatorThree setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled];
[_textFieldSeparatorThree setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled];
[_textFieldSeparatorTwo setValue:normalSeparatorContentInset forThemeAttribute:@"content-inset" inState:CPThemeStateNormal];
[_textFieldSeparatorTwo setValue:selectedSeparatorContentInset forThemeAttribute:@"content-inset" inState:CPThemeStateSelected];
[_textFieldSeparatorTwo setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_textFieldSeparatorTwo setValue:textColor forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_textFieldSeparatorTwo setValue:normalTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_textFieldSeparatorTwo setValue:normalTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal];
[_textFieldSeparatorTwo setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateDisabled];
[_textFieldSeparatorTwo setValue:disabledTextColor forThemeAttribute:@"text-color" inState:CPThemeStateDisabled];
[_textFieldSeparatorTwo setValue:disabledTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled];
[_textFieldSeparatorTwo setValue:disabledTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled];
[_textFieldSeparatorFour setValue:[_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield-separator" inState:CPThemeStateNormal] forThemeAttribute:@"content-inset" inState:CPThemeStateNormal];
[_textFieldSeparatorFour setValue:[_datePicker valueForThemeAttribute:@"content-inset-datepicker-textfield-separator" inState:CPThemeStateSelected] forThemeAttribute:@"content-inset" inState:CPThemeStateSelected];
[_textFieldSeparatorFour setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_textFieldSeparatorFour setValue:[_datePicker textColor] forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_textFieldSeparatorFour setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_textFieldSeparatorFour setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal];
[_textFieldSeparatorFour setValue:[_datePicker textFont] forThemeAttribute:@"font" inState:CPThemeStateDisabled];
[_textFieldSeparatorFour setValue:[_datePicker valueForThemeAttribute:@"text-color" inState:CPThemeStateDisabled] forThemeAttribute:@"text-color" inState:CPThemeStateDisabled];
[_textFieldSeparatorFour setValue:[_datePicker valueForThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled] forThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled];
[_textFieldSeparatorFour setValue:[_datePicker valueForThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled] forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled];
[_textFieldSeparatorThree setValue:normalSeparatorContentInset forThemeAttribute:@"content-inset" inState:CPThemeStateNormal];
[_textFieldSeparatorThree setValue:selectedSeparatorContentInset forThemeAttribute:@"content-inset" inState:CPThemeStateSelected];
[_textFieldSeparatorThree setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_textFieldSeparatorThree setValue:textColor forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_textFieldSeparatorThree setValue:normalTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_textFieldSeparatorThree setValue:normalTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal];
[_textFieldSeparatorThree setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateDisabled];
[_textFieldSeparatorThree setValue:disabledTextColor forThemeAttribute:@"text-color" inState:CPThemeStateDisabled];
[_textFieldSeparatorThree setValue:disabledTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled];
[_textFieldSeparatorThree setValue:disabledTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled];
[_textFieldSeparatorFour setValue:normalSeparatorContentInset forThemeAttribute:@"content-inset" inState:CPThemeStateNormal];
[_textFieldSeparatorFour setValue:selectedSeparatorContentInset forThemeAttribute:@"content-inset" inState:CPThemeStateSelected];
[_textFieldSeparatorFour setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateNormal];
[_textFieldSeparatorFour setValue:textColor forThemeAttribute:@"text-color" inState:CPThemeStateNormal];
[_textFieldSeparatorFour setValue:normalTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateNormal];
[_textFieldSeparatorFour setValue:normalTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateNormal];
[_textFieldSeparatorFour setValue:textFont forThemeAttribute:@"font" inState:CPThemeStateDisabled];
[_textFieldSeparatorFour setValue:disabledTextColor forThemeAttribute:@"text-color" inState:CPThemeStateDisabled];
[_textFieldSeparatorFour setValue:disabledTextShadowColor forThemeAttribute:@"text-shadow-color" inState:CPThemeStateDisabled];
[_textFieldSeparatorFour setValue:disabledTextShadowOffset forThemeAttribute:@"text-shadow-offset" inState:CPThemeStateDisabled];
}
/*! Hide or not the textField depending on the datePickerElements flag
@@ -1013,7 +1036,7 @@ var CPZeroKeyCode = 48,
if ([_textFieldMonth isHidden])
[_textFieldHour setFrameOrigin:CGPointMake(horizontalInset, verticalInset)];
else
[_textFieldHour setFrameOrigin:CGPointMake(CGRectGetMaxX([_textFieldYear frame]) + [_datePicker valueForThemeAttribute:@"date-hour-margin"],verticalInset)];
[_textFieldHour setFrameOrigin:CGPointMake(CGRectGetMaxX([_textFieldYear frame]) + [_datePicker currentValueForThemeAttribute:@"date-hour-margin"], verticalInset)];
[_textFieldSeparatorThree setFrameOrigin:CGPointMake(CGRectGetMaxX([_textFieldHour frame]) + separatorContentInset.left, verticalInset)];
[_textFieldMinute setFrameOrigin:CGPointMake(CGRectGetMaxX([_textFieldSeparatorThree frame]) + separatorContentInset.right, verticalInset)];
@@ -1043,6 +1066,25 @@ var CPZeroKeyCode = 48,
[_textFieldPMAM sizeToFit];
}
/*! Size to fit all of the textFields
*/
- (void)_setControlSizes
{
var controlSize = [_datePicker controlSize];
[_textFieldDay setControlSize:controlSize];
[_textFieldMonth setControlSize:controlSize];
[_textFieldYear setControlSize:controlSize];
[_textFieldHour setControlSize:controlSize];
[_textFieldMinute setControlSize:controlSize];
[_textFieldSecond setControlSize:controlSize];
[_textFieldSeparatorOne setControlSize:controlSize];
[_textFieldSeparatorTwo setControlSize:controlSize];
[_textFieldSeparatorThree setControlSize:controlSize];
[_textFieldSeparatorFour setControlSize:controlSize];
[_textFieldPMAM setControlSize:controlSize];
}
#pragma mark -
#pragma mark Responder methods
+4 -4
View File
@@ -174,20 +174,20 @@ following:
return _CPFontSystemFontSize;
}
+ (float)systemFontSizeForControlSize:(CPControlSize)aSize
+ (CPFont)systemFontForControlSize:(CPControlSize)aSize
{
// TODO These sizes should be themable or made less arbitrary in some other way.
switch (aSize)
{
case CPSmallControlSize:
return _CPFontSystemFontSize - 1;
return [self systemFontOfSize:_CPFontSystemFontSize - 1];
case CPMiniControlSize:
return _CPFontSystemFontSize - 2;
return [self systemFontOfSize:_CPFontSystemFontSize - 2];
case CPRegularControlSize:
default:
return _CPFontSystemFontSize;
return [self systemFontOfSize:_CPFontSystemFontSize];
}
}
-2
View File
@@ -26,8 +26,6 @@
@import "CPMenu.j"
@import "CPMenuItem.j"
var VISIBLE_MARGIN = 7.0;
CPPopUpButtonStatePullsDown = CPThemeState("pulls-down");
/*!
+27 -5
View File
@@ -147,8 +147,10 @@ var CPRuleEditorItemPBoardType = @"CPRuleEditorItemPBoardType",
@"slice-bottom-border-color": [CPNull null],
@"slice-last-bottom-border-color": [CPNull null],
@"font": [CPNull null],
@"font-color": [CPNull null],
@"add-image": [CPNull null],
@"remove-image": [CPNull null],
@"vertical-alignment": [CPNull null]
};
}
@@ -159,7 +161,7 @@ var CPRuleEditorItemPBoardType = @"CPRuleEditorItemPBoardType",
{
_slices = [[CPMutableArray alloc] init];
_sliceHeight = 26.;
_sliceHeight = 26.0;
_nestingMode = CPRuleEditorNestingModeSimple; // 10.5 default is CPRuleEditorNestingModeCompound
_editable = YES;
_allowsEmptyCompoundRows = NO;
@@ -1885,14 +1887,34 @@ TODO: implement
return [self valueForThemeAttribute:@"font"];
}
- (CPImage)_addImage
- (CPColor)_fontColor
{
return [self valueForThemeAttribute:@"add-image"];
return [self valueForThemeAttribute:@"font-color"];
}
- (CPImage)_removeImage
- (CPImage)_imageAdd
{
return [self valueForThemeAttribute:@"remove-image"];
return [self valueForThemeAttribute:@"add-image" inState:CPThemeStateNormal];
}
- (CPImage)_imageAddHighlighted
{
return [self valueForThemeAttribute:@"add-image" inState:CPThemeStateHighlighted];
}
- (CPImage)_imageRemove
{
return [self valueForThemeAttribute:@"remove-image" inState:CPThemeStateNormal];
}
- (CPImage)_imageRemoveHighlighted
{
return [self valueForThemeAttribute:@"remove-image" inState:CPThemeStateHighlighted];
}
- (CPVerticalTextAlignment)_verticalAlignment
{
return [self valueForThemeAttribute:@"vertical-alignment"];
}
- (CPString)_toolTipForAddCompoundRowButton
@@ -1,203 +0,0 @@
/*
* Created by cacaodev@gmail.com.
* Copyright (c) 2011 Pear, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
@import "CPBezierPath.j"
@import "CPPopUpButton.j"
@class _CPRuleEditorViewSlice
var GRADIENT_START_COLOR = "#fcfcfc",
GRADIENT_END_COLOR = "#dfdfdf",
BORDER_COLOR = "#BDBDBD";
var GRADIENT_NORMAL,
GRADIENT_HIGHLIGHTED,
GRADIENT_PROPERTY;
if (CPBrowserIsEngine(CPWebKitBrowserEngine))
{
GRADIENT_NORMAL = "-webkit-gradient(linear, left top, left bottom, from(" + GRADIENT_START_COLOR + "), to(" + GRADIENT_END_COLOR + "))",
GRADIENT_HIGHLIGHTED = "-webkit-gradient(linear, left top, left bottom, from(" + GRADIENT_END_COLOR + "), to(" + GRADIENT_START_COLOR + "))";
GRADIENT_PROPERTY = "background";
}
else if (CPBrowserIsEngine(CPGeckoBrowserEngine))
{
GRADIENT_NORMAL = "-moz-linear-gradient(top, " + GRADIENT_START_COLOR + ", " + GRADIENT_END_COLOR + ")",
GRADIENT_HIGHLIGHTED = "-moz-linear-gradient(top, " + GRADIENT_END_COLOR + ", " + GRADIENT_START_COLOR + ")";
GRADIENT_PROPERTY = "background";
}
else if (CPBrowserIsEngine(CPInternetExplorerBrowserEngine))
{
GRADIENT_NORMAL = "progid:DXImageTransform.Microsoft.gradient(startColorstr='" + GRADIENT_START_COLOR + "', endColorstr='" + GRADIENT_END_COLOR + "')";
GRADIENT_HIGHLIGHTED = "progid:DXImageTransform.Microsoft.gradient(startColorstr='" + GRADIENT_END_COLOR + "', endColorstr='" + GRADIENT_START_COLOR + "')";
GRADIENT_PROPERTY = "filter";
}else
{
GRADIENT_NORMAL = GRADIENT_START_COLOR;
GRADIENT_HIGHLIGHTED = GRADIENT_END_COLOR;
GRADIENT_PROPERTY = "background";
}
@implementation _CPRuleEditorPopUpButton : CPPopUpButton
{
CPInteger radius;
}
- (void)_sharedInit
{
[self setBordered:NO];
#if PLATFORM(DOM)
var style = _DOMElement.style;
style.border = "1px solid " + BORDER_COLOR;
style[GRADIENT_PROPERTY] = GRADIENT_NORMAL;
#endif
}
- (id)initWithFrame:(CGRect)aFrame
{
if (self = [super initWithFrame:aFrame])
[self _sharedInit];
return self;
}
- (id)initWithCoder:(CPCoder)aCoder
{
self = [super initWithCoder:aCoder];
[self _sharedInit];
return self;
}
- (CPView)hitTest:(CGPoint)point
{
if (!CGRectContainsPoint([self frame], point) || ![self sliceIsEditable])
return nil;
return self;
}
- (BOOL)sliceIsEditable
{
var superview = [self superview];
return ![superview isKindOfClass:[_CPRuleEditorViewSlice]] || [superview isEditable];
}
- (void)trackMouse:(CPEvent)theEvent
{
if (![self sliceIsEditable])
return;
[super trackMouse:theEvent];
}
- (CGRect)contentRectForBounds:(CGRect)bounds
{
var contentRect = [super contentRectForBounds:bounds];
contentRect.origin.x += radius;
contentRect.size.width -= 2 * radius;
return contentRect;
}
- (void)layoutSubviews
{
#if PLATFORM(DOM)
radius = FLOOR(CGRectGetHeight([self bounds]) / 2);
var style = _DOMElement.style,
radiusCSS = radius + "px";
style.borderRadius = radiusCSS;
#endif
[super layoutSubviews];
}
- (void)drawRect:(CGRect)aRect
{
var context = [[CPGraphicsContext currentContext] graphicsPort],
bounds = [self bounds],
arrow_width = FLOOR(CGRectGetHeight(bounds) / 3.5);
CGContextTranslateCTM(context, CGRectGetWidth(bounds) - radius - arrow_width, CGRectGetHeight(bounds) / 2);
var arrowsPath = [CPBezierPath bezierPath];
[arrowsPath moveToPoint:CGPointMake(0, 1)];
[arrowsPath lineToPoint:CGPointMake(arrow_width, 1)];
[arrowsPath lineToPoint:CGPointMake(arrow_width / 2, arrow_width + 1)];
[arrowsPath closePath];
CGContextSetFillColor(context, [CPColor colorWithWhite:101 / 255 alpha:1]);
[arrowsPath fill];
CGContextScaleCTM(context, 1 , -1);
[arrowsPath fill];
}
@end
@implementation _CPRuleEditorButton : CPButton
{
CPInteger radius;
}
- (void)_sharedInit
{
[self setBordered:NO];
#if PLATFORM(DOM)
var style = _DOMElement.style;
style.border = "1px solid " + BORDER_COLOR;
style[GRADIENT_PROPERTY] = GRADIENT_NORMAL;
#endif
}
- (id)initWithFrame:(CGRect)aFrame
{
if (self = [super initWithFrame:aFrame])
[self _sharedInit];
return self;
}
- (id)initWithCoder:(CPCoder)aCoder
{
self = [super initWithCoder:aCoder];
[self _sharedInit];
return self;
}
- (void)layoutSubviews
{
#if PLATFORM(DOM)
radius = FLOOR(CGRectGetHeight([self bounds]) / 2);
var style = _DOMElement.style,
radiusCSS = radius + "px";
style.borderRadius = radiusCSS;
style[GRADIENT_PROPERTY] = ([self isHighlighted]) ? GRADIENT_HIGHLIGHTED : GRADIENT_NORMAL;
#endif
[super layoutSubviews];
}
@end
+3 -3
View File
@@ -61,9 +61,9 @@
- (void)drawRect:(CGRect)rect
{
var context = [[CPGraphicsContext currentContext] graphicsPort],
bounds = [self bounds],
maxX = CGRectGetWidth(bounds),
maxY = CGRectGetHeight(bounds);
bounds = [self bounds],
maxX = CGRectGetWidth(bounds),
maxY = CGRectGetHeight(bounds);
// Draw background
if ([self _isSelected])
+72 -86
View File
@@ -19,24 +19,27 @@
@import "CPRuleEditor_Constants.j"
@import "_CPRuleEditorViewSlice.j"
@import "_CPRuleEditorPopUpButton.j"
@import "CPButton.j"
@import "CPDatePicker.j"
@import "CPPopUpButton.j"
@global CPApp
var CONTROL_HEIGHT = 16.,
BUTTON_HEIGHT = 16.;
@global CPMiniControlSize
@global CPSmallControlSize
@implementation _CPRuleEditorViewSliceRow : _CPRuleEditorViewSlice
{
CPMutableArray _ruleOptionViews;
CPMutableArray _ruleOptionFrames;
CPMutableArray _correspondingRuleItems;
CPMutableArray _ruleOptionInitialViewFrames;
CPButton _addButton;
CPButton _subtractButton;
CPButton _addButton;
CPButton _subtractButton;
CPMutableArray _correspondingRuleItems;
CPMutableArray _ruleOptionFrames;
CPMutableArray _ruleOptionInitialViewFrames;
CPMutableArray _ruleOptionViews;
CPRuleEditorRowType _rowType @accessors;
CPRuleEditorRowType _plusButtonRowType;
CPRuleEditorRowType _rowType @accessors;
CPRuleEditorRowType _plusButtonRowType;
}
- (id)initWithFrame:(CGRect)frame ruleEditorView:(id)editor
@@ -49,34 +52,35 @@ var CONTROL_HEIGHT = 16.,
- (void)_initShared
{
_correspondingRuleItems = [[CPMutableArray alloc] init];
_ruleOptionFrames = [[CPMutableArray alloc] init];
_ruleOptionInitialViewFrames = [[CPMutableArray alloc] init];
_ruleOptionViews = [[CPMutableArray alloc] init];
_editable = [_ruleEditor isEditable];
_correspondingRuleItems = [[CPMutableArray alloc] init];
_ruleOptionFrames = [[CPMutableArray alloc] init];
_ruleOptionInitialViewFrames = [[CPMutableArray alloc] init];
_ruleOptionViews = [[CPMutableArray alloc] init];
_editable = [_ruleEditor isEditable];
_addButton = [self _createAddRowButton];
_subtractButton = [self _createDeleteRowButton];
_addButton = [self _createAddRowButton];
_subtractButton = [self _createDeleteRowButton];
[_addButton setToolTip:[_ruleEditor _toolTipForAddSimpleRowButton]];
[_subtractButton setToolTip:[_ruleEditor _toolTipForDeleteRowButton]];
[_addButton setHidden:!_editable];
[_subtractButton setHidden:!_editable];
[self addSubview:_addButton];
[self addSubview:_subtractButton];
[self setAutoresizingMask:CPViewWidthSizable];
var center = [CPNotificationCenter defaultCenter];
[center addObserver:self selector:@selector(_textDidChange:) name:CPControlTextDidChangeNotification object:nil];
[[CPNotificationCenter defaultCenter] addObserver:self selector:@selector(_textDidChange:) name:CPControlTextDidChangeNotification object:nil];
}
- (CPButton)_createRowButton
{
var button = [[_CPRuleEditorButton alloc] initWithFrame:CGRectMakeZero()];
[button setFont:[CPFont boldFontWithName:@"Apple Symbol" size:12.0]];
[button setTextColor:[CPColor colorWithWhite:150 / 255 alpha:1]];
var button = [[CPButton alloc] initWithFrame:CGRectMakeZero()];
[button setFont:[_ruleEditor font]];
[button setTextColor:[_ruleEditor _fontColor]];
[button setAlignment:CPCenterTextAlignment];
[button setAutoresizingMask:CPViewMinXMargin];
[button setButtonType:CPMomentaryChangeButton];
[button setBordered:NO];
[button setHidden:!_editable];
[button setImagePosition:CPImageOnly];
return button;
@@ -86,7 +90,10 @@ var CONTROL_HEIGHT = 16.,
{
var button = [self _createRowButton];
[button setImage:[_ruleEditor _addImage]];
[button setToolTip:[_ruleEditor _toolTipForAddSimpleRowButton]];
[button setValue:[_ruleEditor _imageAdd] forThemeAttribute:@"image" inState:CPThemeStateNormal];
[button setValue:[_ruleEditor _imageAddHighlighted] forThemeAttribute:@"image" inState:CPThemeStateHighlighted];
[button setAction:@selector(_addOption:)];
[button setTarget:self];
@@ -97,7 +104,10 @@ var CONTROL_HEIGHT = 16.,
{
var button = [self _createRowButton];
[button setImage:[_ruleEditor _removeImage]];
[button setToolTip:[_ruleEditor _toolTipForDeleteRowButton]];
[button setValue:[_ruleEditor _imageRemove] forThemeAttribute:@"image" inState:CPThemeStateNormal];
[button setValue:[_ruleEditor _imageRemoveHighlighted] forThemeAttribute:@"image" inState:CPThemeStateHighlighted];
[button setAction:@selector(_deleteOption:)];
[button setTarget:self];
@@ -107,20 +117,17 @@ var CONTROL_HEIGHT = 16.,
- (CPMenuItem)_createMenuItemWithTitle:(CPString )title
{
title = [[_ruleEditor standardLocalizer] localizedStringForString:title];
var mItem = [[CPMenuItem alloc] initWithTitle:title action:nil keyEquivalent:@""];
return mItem;
return [[CPMenuItem alloc] initWithTitle:title action:nil keyEquivalent:@""];
}
- (CPPopUpButton)_createPopUpButtonWithItems:(CPArray)itemsArray selectedItemIndex:(int)index
{
var title = [[itemsArray objectAtIndex:index] title],
font = [_ruleEditor font],
width = [title sizeWithFont:font].width + 20,
rect = CGRectMake(0, 0, (width - width % 40) + 80, CONTROL_HEIGHT),
var title = [[itemsArray objectAtIndex:index] title],
font = [_ruleEditor font],
width = [title sizeWithFont:font].width + 20,
rect = CGRectMake(0, 0, (width - width % 40) + 80, [_ruleEditor rowHeight]),
popup = [[CPPopUpButton alloc] initWithFrame:rect];
popup = [[_CPRuleEditorPopUpButton alloc] initWithFrame:rect];
[popup setTextColor:[CPColor colorWithWhite:101 / 255 alpha:1]];
[popup setValue:font forThemeAttribute:@"font"];
var count = [itemsArray count];
@@ -137,17 +144,17 @@ var CONTROL_HEIGHT = 16.,
return [CPMenuItem separatorItem];
}
- (_CPRuleEditorTextField)_createStaticTextFieldWithStringValue:(CPString)text
- (CPTextField)_createStaticTextFieldWithStringValue:(CPString)text
{
var textField = [[_CPRuleEditorTextField alloc] initWithFrame:CGRectMakeZero()],
ruleEditorFont = [_ruleEditor font],
font = [CPFont fontWithName:[ruleEditorFont familyName] size:[ruleEditorFont size] + 2],
localizedText = [[_ruleEditor standardLocalizer] localizedStringForString:text],
size = [localizedText sizeWithFont:font];
[textField setFrameSize:CGSizeMake(size.width + 4, CONTROL_HEIGHT + 2)];
var textField = [[CPTextField alloc] initWithFrame:CGRectMakeZero()],
ruleEditorFont = [_ruleEditor font],
font = [CPFont fontWithName:[ruleEditorFont familyName] size:[ruleEditorFont size] + 2],
localizedText = [[_ruleEditor standardLocalizer] localizedStringForString:text],
size = [localizedText sizeWithFont:font];
[textField setFrameSize:CGSizeMake(size.width + 4, [_ruleEditor rowHeight])];
[textField setValue:font forThemeAttribute:@"font"];
[textField setValue:[_ruleEditor _verticalAlignment] forThemeAttribute:@"vertical-alignment"];
[textField setStringValue:localizedText];
return textField;
@@ -159,6 +166,7 @@ var CONTROL_HEIGHT = 16.,
[self setNeedsDisplay:YES];
var type = _plusButtonRowType;
if ([_ruleEditor nestingMode] == CPRuleEditorNestingModeCompound && ([[CPApp currentEvent] modifierFlags] & CPAlternateKeyMask))
type = CPRuleEditorRowTypeCompound;
@@ -170,12 +178,12 @@ var CONTROL_HEIGHT = 16.,
[_ruleEditor _deleteSlice:self];
}
- (void)_ruleOptionPopupChangedAction:(CPMenuItem )sender
- (void)_ruleOptionPopupChangedAction:(CPMenuItem)sender
{
var layoutdict = [sender representedObject],
newItem = [layoutdict objectForKey:@"item"],
var layoutdict = [sender representedObject],
newItem = [layoutdict objectForKey:@"item"],
indexInCriteria = [layoutdict objectForKey:@"indexInCriteria"],
oldItem = [_correspondingRuleItems objectAtIndex:indexInCriteria];
oldItem = [_correspondingRuleItems objectAtIndex:indexInCriteria];
if (![newItem isEqual:oldItem])
{
@@ -307,6 +315,8 @@ var CONTROL_HEIGHT = 16.,
if (ruleView != nil)
{
[ruleView setControlSize:CPSmallControlSize];
[_ruleOptionViews addObject:ruleView];
var frame = [ruleView frame];
[_ruleOptionInitialViewFrames addObject:frame];
@@ -331,8 +341,6 @@ var CONTROL_HEIGHT = 16.,
var aView = [_ruleOptionViews objectAtIndex:firstResponderIndex];
[[self window] makeFirstResponder:aView]; // This is not working. bug in CPPopUpButton firstResponder ?
}
//[self setNeedsDisplay:YES];
}
- (void)_updateEnabledStateForSubviews
@@ -350,14 +358,15 @@ var CONTROL_HEIGHT = 16.,
var optionViewOriginX,
leftHorizontalPadding,
leftButtonMinX,
rowHeight = [_ruleEditor rowHeight],
count = [_ruleOptionViews count],
sliceFrame = [self frame],
rowHeight = [_ruleEditor rowHeight],
count = [_ruleOptionViews count],
sliceFrame = [self frame],
image = [_ruleEditor _imageAdd],
buttonFrame = CGRectMake(CGRectGetWidth(sliceFrame) - BUTTON_HEIGHT - [self _rowButtonsRightHorizontalPadding], ([_ruleEditor rowHeight] - BUTTON_HEIGHT) / 2 - 2, BUTTON_HEIGHT, BUTTON_HEIGHT);
buttonFrame = CGRectMake(CGRectGetWidth(sliceFrame) - [image size].width - [self _rowButtonsRightHorizontalPadding], ([_ruleEditor rowHeight] - [image size].height) / 2 - 1, [image size].width, [image size].height);
[_addButton setFrame:buttonFrame];
buttonFrame.origin.x -= BUTTON_HEIGHT + [self _rowButtonsInterviewHorizontalPadding];
buttonFrame.origin.x -= [image size].width + [self _rowButtonsInterviewHorizontalPadding];
[_subtractButton setFrame:buttonFrame];
if (widthChanged)
@@ -372,7 +381,8 @@ var CONTROL_HEIGHT = 16.,
var ruleOptionView = _ruleOptionViews[i],
optionFrame = _ruleOptionFrames[i];
optionFrame.origin.y = (rowHeight - CGRectGetHeight(optionFrame)) / 2 - 2;
// Use a pixel correction to align controls
optionFrame.origin.y = (rowHeight - CGRectGetHeight(optionFrame)) / 2;
if (widthChanged)
{
@@ -488,8 +498,9 @@ var CONTROL_HEIGHT = 16.,
- (BOOL)_isRulePopup:(CPView)view
{
if ([view isKindOfClass:[_CPRuleEditorPopUpButton class]])
if ([view isKindOfClass:[CPPopUpButton class]])
return YES;
return NO;
}
@@ -505,29 +516,4 @@ var CONTROL_HEIGHT = 16.,
[self _sendRuleAction:nil];
}
@end
@implementation _CPRuleEditorTextField : CPTextField
{
}
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self)
{
[self setDrawsBackground:NO];
}
return self;
}
- (CPView)hitTest:(CGPoint)point
{
if (!CGRectContainsPoint([self frame], point))
return nil;
return [self superview];
}
@end
@end
+1 -32
View File
@@ -78,7 +78,6 @@ CPThemeStateScrollerKnobDark = CPThemeState("scroller-knob-dark");
@implementation CPScroller : CPControl
{
CPControlSize _controlSize;
CPUsableScrollerParts _usableParts;
CPArray _partRects;
@@ -172,7 +171,6 @@ CPThemeStateScrollerKnobDark = CPThemeState("scroller-knob-dark");
{
if (self = [super initWithFrame:aFrame])
{
_controlSize = CPRegularControlSize;
_partRects = [];
[self setFloatValue:0.0];
@@ -243,29 +241,6 @@ CPThemeStateScrollerKnobDark = CPThemeState("scroller-knob-dark");
[super setObjectValue:MIN(1.0, MAX(0.0, +aValue))];
}
/*!
Returns the scroller's control size
*/
- (CPControlSize)controlSize
{
return _controlSize;
}
/*!
Sets the scroller's size.
@param aControlSize the scroller's size
*/
- (void)setControlSize:(CPControlSize)aControlSize
{
if (_controlSize == aControlSize)
return;
_controlSize = aControlSize;
[self setNeedsLayout];
[self setNeedsDisplay:YES];
}
/*!
Return's the knob's proportion
*/
@@ -802,8 +777,7 @@ CPThemeStateScrollerKnobDark = CPThemeState("scroller-knob-dark");
@end
var CPScrollerControlSizeKey = @"CPScrollerControlSize",
CPScrollerIsVerticalKey = @"CPScrollerIsVerticalKey",
var CPScrollerIsVerticalKey = @"CPScrollerIsVerticalKey",
CPScrollerKnobProportionKey = @"CPScrollerKnobProportion",
CPScrollerStyleKey = @"CPScrollerStyleKey";
@@ -813,10 +787,6 @@ var CPScrollerControlSizeKey = @"CPScrollerControlSize",
{
if (self = [super initWithCoder:aCoder])
{
_controlSize = CPRegularControlSize;
if ([aCoder containsValueForKey:CPScrollerControlSizeKey])
_controlSize = [aCoder decodeIntForKey:CPScrollerControlSizeKey];
_knobProportion = 1.0;
if ([aCoder containsValueForKey:CPScrollerKnobProportionKey])
@@ -851,7 +821,6 @@ var CPScrollerControlSizeKey = @"CPScrollerControlSize",
{
[super encodeWithCoder:aCoder];
[aCoder encodeInt:_controlSize forKey:CPScrollerControlSizeKey];
[aCoder encodeInt:_isVertical forKey:CPScrollerIsVerticalKey];
[aCoder encodeFloat:_knobProportion forKey:CPScrollerKnobProportionKey];
[aCoder encodeInt:_style forKey:CPScrollerStyleKey];
+21 -13
View File
@@ -138,9 +138,16 @@
[self setContinuous:_autorepeat];
[self addSubview:_buttonDown];
[self _sizeToFit];
[self setNeedsLayout];
}
- (void)setControlSize:(CPControlSize)aControlSize
{
[super setControlSize:aControlSize];
[self _sizeToFit];
}
#pragma mark -
#pragma mark Superclass overrides
@@ -159,8 +166,8 @@
- (void)setFrame:(CGRect)aFrame
{
var upSize = [self valueForThemeAttribute:@"up-button-size"],
downSize = [self valueForThemeAttribute:@"down-button-size"],
var upSize = [self currentValueForThemeAttribute:@"up-button-size"],
downSize = [self currentValueForThemeAttribute:@"down-button-size"],
minSize = CGSizeMake(upSize.width, upSize.height + downSize.height),
frame = CGRectMakeCopy(aFrame);
@@ -172,21 +179,22 @@
/*! @ignore */
- (void)layoutSubviews
{
var aFrame = [self frame],
upSize = [self valueForThemeAttribute:@"up-button-size"],
downSize = [self valueForThemeAttribute:@"down-button-size"],
upFrame = CGRectMake(aFrame.size.width - upSize.width, 0, upSize.width, upSize.height),
downFrame = CGRectMake(aFrame.size.width - downSize.width, upSize.height, downSize.width, downSize.height);
var controlSizeThemeState = [self _controlSizeThemeState],
aFrame = [self frame],
upSize = [self valueForThemeAttribute:@"up-button-size" inState:controlSizeThemeState],
downSize = [self valueForThemeAttribute:@"down-button-size" inState:controlSizeThemeState],
upFrame = CGRectMake(0, 0, upSize.width, upSize.height),
downFrame = CGRectMake(0, upSize.height, downSize.width, downSize.height);
[_buttonUp setFrame:upFrame];
[_buttonDown setFrame:downFrame];
[_buttonUp setValue:[self valueForThemeAttribute:@"bezel-color-up-button" inState:CPThemeStateBordered] forThemeAttribute:@"bezel-color" inState:CPThemeStateBordered];
[_buttonUp setValue:[self valueForThemeAttribute:@"bezel-color-up-button" inState:[CPThemeStateBordered, CPThemeStateDisabled]] forThemeAttribute:@"bezel-color" inState:[CPThemeStateBordered, CPThemeStateDisabled]];
[_buttonUp setValue:[self valueForThemeAttribute:@"bezel-color-up-button" inState:[CPThemeStateBordered, CPThemeStateHighlighted]] forThemeAttribute:@"bezel-color" inState:[CPThemeStateBordered, CPThemeStateHighlighted]];
[_buttonDown setValue:[self valueForThemeAttribute:@"bezel-color-down-button" inState:CPThemeStateBordered] forThemeAttribute:@"bezel-color" inState:CPThemeStateBordered];
[_buttonDown setValue:[self valueForThemeAttribute:@"bezel-color-down-button" inState:[CPThemeStateBordered, CPThemeStateDisabled]] forThemeAttribute:@"bezel-color" inState:[CPThemeStateBordered, CPThemeStateDisabled]];
[_buttonDown setValue:[self valueForThemeAttribute:@"bezel-color-down-button" inState:[CPThemeStateBordered, CPThemeStateHighlighted]] forThemeAttribute:@"bezel-color" inState:[CPThemeStateBordered, CPThemeStateHighlighted]];
[_buttonUp setValue:[self valueForThemeAttribute:@"bezel-color-up-button" inState:[controlSizeThemeState, CPThemeStateBordered]] forThemeAttribute:@"bezel-color" inState:CPThemeStateBordered];
[_buttonUp setValue:[self valueForThemeAttribute:@"bezel-color-up-button" inState:[controlSizeThemeState, CPThemeStateBordered, CPThemeStateDisabled]] forThemeAttribute:@"bezel-color" inState:[CPThemeStateBordered, CPThemeStateDisabled]];
[_buttonUp setValue:[self valueForThemeAttribute:@"bezel-color-up-button" inState:[controlSizeThemeState, CPThemeStateBordered, CPThemeStateHighlighted]] forThemeAttribute:@"bezel-color" inState:[CPThemeStateBordered, CPThemeStateHighlighted]];
[_buttonDown setValue:[self valueForThemeAttribute:@"bezel-color-down-button" inState:[controlSizeThemeState, CPThemeStateBordered]] forThemeAttribute:@"bezel-color" inState:CPThemeStateBordered];
[_buttonDown setValue:[self valueForThemeAttribute:@"bezel-color-down-button" inState:[controlSizeThemeState, CPThemeStateBordered, CPThemeStateDisabled]] forThemeAttribute:@"bezel-color" inState:[CPThemeStateBordered, CPThemeStateDisabled]];
[_buttonDown setValue:[self valueForThemeAttribute:@"bezel-color-down-button" inState:[controlSizeThemeState, CPThemeStateBordered, CPThemeStateHighlighted]] forThemeAttribute:@"bezel-color" inState:[CPThemeStateBordered, CPThemeStateHighlighted]];
}
- (void)_sizeToFit
+15 -1
View File
@@ -141,7 +141,6 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
// NS-style Display Properties
CPTextFieldBezelStyle _bezelStyle;
BOOL _isBordered;
CPControlSize _controlSize;
}
+ (Class)_binderClassForBinding:(CPString)aBinding
@@ -228,6 +227,21 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
};
}
#pragma mark -
#pragma mark Control Size
- (void)setControlSize:(CPControlSize)aControlSize
{
[super setControlSize:aControlSize];
if ([self isBezeled])
[self _sizeToControlSize];
}
#pragma mark -
#if PLATFORM(DOM)
- (DOMElement)_inputElement
{
+22 -19
View File
@@ -499,25 +499,28 @@ function CPThemeState()
@end
CPThemeStateNormal = CPThemeState("normal");
CPThemeStateDisabled = CPThemeState("disabled");
CPThemeStateHovered = CPThemeState("hovered");
CPThemeStateHighlighted = CPThemeState("highlighted");
CPThemeStateSelected = CPThemeState("selected");
CPThemeStateTableDataView = CPThemeState("tableDataView");
CPThemeStateSelectedDataView = CPThemeState("selectedTableDataView");
CPThemeStateGroupRow = CPThemeState("CPThemeStateGroupRow");
CPThemeStateBezeled = CPThemeState("bezeled");
CPThemeStateBordered = CPThemeState("bordered");
CPThemeStateEditable = CPThemeState("editable");
CPThemeStateEditing = CPThemeState("editing");
CPThemeStateVertical = CPThemeState("vertical");
CPThemeStateDefault = CPThemeState("default");
CPThemeStateCircular = CPThemeState("circular");
CPThemeStateAutocompleting = CPThemeState("autocompleting");
CPThemeStateFirstResponder = CPThemeState("firstResponder");
CPThemeStateMainWindow = CPThemeState("mainWindow");
CPThemeStateKeyWindow = CPThemeState("keyWindow");
CPThemeStateNormal = CPThemeState("normal");
CPThemeStateDisabled = CPThemeState("disabled");
CPThemeStateHovered = CPThemeState("hovered");
CPThemeStateHighlighted = CPThemeState("highlighted");
CPThemeStateSelected = CPThemeState("selected");
CPThemeStateTableDataView = CPThemeState("tableDataView");
CPThemeStateSelectedDataView = CPThemeState("selectedTableDataView");
CPThemeStateGroupRow = CPThemeState("CPThemeStateGroupRow");
CPThemeStateBezeled = CPThemeState("bezeled");
CPThemeStateBordered = CPThemeState("bordered");
CPThemeStateEditable = CPThemeState("editable");
CPThemeStateEditing = CPThemeState("editing");
CPThemeStateVertical = CPThemeState("vertical");
CPThemeStateDefault = CPThemeState("default");
CPThemeStateCircular = CPThemeState("circular");
CPThemeStateAutocompleting = CPThemeState("autocompleting");
CPThemeStateFirstResponder = CPThemeState("firstResponder");
CPThemeStateMainWindow = CPThemeState("mainWindow");
CPThemeStateKeyWindow = CPThemeState("keyWindow");
CPThemeStateControlSizeRegular = CPThemeState("controlSizeRegular");
CPThemeStateControlSizeSmall = CPThemeState("controlSizeSmall");
CPThemeStateControlSizeMini = CPThemeState("controlSizeMini");
@implementation _CPThemeAttribute : CPObject
{
+16 -2
View File
@@ -1805,6 +1805,9 @@ var CPViewFlags = { },
_DOMElement.style.background = "";
_DOMImageParts[0].style.background = [_backgroundColor cssString];
if (patternImage)
_DOMImageParts[0].style.backgroundSize = [patternImage size].width + "px " + [patternImage size].height + "px";
if (CPFeatureIsCompatible(CPOpacityRequiresFilterFeature))
_DOMImageParts[0].style.filter = "alpha(opacity=" + [_backgroundColor alphaComponent] * 100 + ")";
else
@@ -1815,6 +1818,9 @@ var CPViewFlags = { },
}
else
_DOMElement.style.background = colorCSS;
if (patternImage)
_DOMElement.style.backgroundSize = [patternImage size].width + "px " + [patternImage size].height + "px";
}
else
{
@@ -1919,18 +1925,22 @@ var CPViewFlags = { },
// Make sure to repeat the top and bottom pieces horizontally if they're not the exact width needed.
if (top)
{
_DOMImageParts[partIndex].style.backgroundSize = frameSize.width + "px " + top + "px";
CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[partIndex], NULL, 0.0, 0.0);
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], frameSize.width, top);
partIndex++;
}
if (_DOMImageSizes[1])
{
var height = frameSize.height - top - bottom;
_DOMImageParts[partIndex].style.backgroundSize = frameSize.width + "px " + height + "px";
CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[partIndex], NULL, 0.0, top);
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], frameSize.width, frameSize.height - top - bottom);
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], frameSize.width, height);
partIndex++;
}
if (bottom)
{
_DOMImageParts[partIndex].style.backgroundSize = frameSize.width + "px " + bottom + "px";
CPDOMDisplayServerSetStyleLeftBottom(_DOMImageParts[partIndex], NULL, 0.0, 0.0);
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], frameSize.width, bottom);
}
@@ -1945,18 +1955,22 @@ var CPViewFlags = { },
// Make sure to repeat the left and right pieces vertically if they're not the exact height needed.
if (left)
{
_DOMImageParts[partIndex].style.backgroundSize = left + "px " + frameSize.height + "px";
CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[partIndex], NULL, 0.0, 0.0);
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], left, frameSize.height);
partIndex++;
}
if (_DOMImageSizes[1])
{
var width = (frameSize.width - left - right)
_DOMImageParts[partIndex].style.backgroundSize = width + "px " + frameSize.height + "px";
CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[partIndex], NULL, left, 0.0);
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], frameSize.width - left - right, frameSize.height);
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], width, frameSize.height);
partIndex++;
}
if (right)
{
_DOMImageParts[partIndex].style.backgroundSize = right + "px " + frameSize.height + "px";
CPDOMDisplayServerSetStyleRightTop(_DOMImageParts[partIndex], NULL, 0.0, 0.0);
CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], right, frameSize.height);
}
+264 -45
View File
@@ -419,6 +419,25 @@ var themedButtonValues = nil,
],
PatternIsHorizontal),
smallBezelColor = PatternColor(
"{style}button-bezel{state}{position}.png",
{
styles: ["", "default"],
states: ["", "highlighted", "disabled"],
width: 3.0,
height: 20.0,
orientation: PatternIsHorizontal
}),
miniBezelColor = PatternColor(
"{style}button-bezel{state}{position}.png",
{
styles: ["", "default"],
states: ["", "highlighted", "disabled"],
width: 3.0,
height: 16.0,
orientation: PatternIsHorizontal
}),
defaultBezelColor = PatternColor(
[
["default-button-bezel-left.png", 4.0, 24.0],
@@ -513,6 +532,48 @@ var themedButtonValues = nil,
[@"bezel-color", defaultDisabledBezelColor, [CPThemeStateBordered, CPThemeStateDefault, CPThemeStateDisabled]],
[@"content-inset", CGInsetMake(0.0, 7.0, 0.0, 7.0), CPThemeStateBordered],
// RoundRect CPThemeStateControlSizeSmall
[@"bezel-color",
smallBezelColor["@"]["@"],
[CPThemeStateControlSizeSmall, CPThemeStateBordered]],
[@"bezel-color",
smallBezelColor["@"]["highlighted"],
[CPThemeStateControlSizeSmall, CPThemeStateBordered, CPThemeStateHighlighted]],
[@"bezel-color",
smallBezelColor["@"]["disabled"],
[CPThemeStateControlSizeSmall, CPThemeStateBordered, CPThemeStateDisabled]],
[@"bezel-color",
smallBezelColor["default"]["@"],
[CPThemeStateControlSizeSmall, CPThemeStateBordered, CPThemeStateDefault]],
[@"bezel-color",
smallBezelColor["default"]["highlighted"],
[CPThemeStateControlSizeSmall, CPThemeStateBordered, CPThemeStateHighlighted, CPThemeStateDefault]],
[@"bezel-color",
smallBezelColor["default"]["disabled"],
[CPThemeStateControlSizeSmall, CPThemeStateBordered, CPThemeStateDefault, CPThemeStateDisabled]],
[@"content-inset", CGInsetMake(0.0, 5.0, 0.0, 5.0), [CPThemeStateControlSizeSmall, CPThemeStateBordered]],
// RoundRect CPThemeStateControlSizeMini
[@"bezel-color",
miniBezelColor["@"]["@"],
[CPThemeStateControlSizeMini, CPThemeStateBordered]],
[@"bezel-color",
miniBezelColor["@"]["highlighted"],
[CPThemeStateControlSizeMini, CPThemeStateBordered, CPThemeStateHighlighted]],
[@"bezel-color",
miniBezelColor["@"]["disabled"],
[CPThemeStateControlSizeMini, CPThemeStateBordered, CPThemeStateDisabled]],
[@"bezel-color",
miniBezelColor["default"]["@"],
[CPThemeStateControlSizeMini, CPThemeStateBordered, CPThemeStateDefault]],
[@"bezel-color",
miniBezelColor["default"]["highlighted"],
[CPThemeStateControlSizeMini, CPThemeStateBordered, CPThemeStateHighlighted, CPThemeStateDefault]],
[@"bezel-color",
miniBezelColor["default"]["disabled"],
[CPThemeStateControlSizeMini, CPThemeStateBordered, CPThemeStateDefault, CPThemeStateDisabled]],
[@"content-inset", CGInsetMake(0.0, 2.0, 2.0, 2.0), [CPThemeStateControlSizeMini, CPThemeStateBordered]],
[@"bezel-color", roundedBezelColor, [CPThemeStateBordered, CPButtonStateBezelStyleRounded]],
[@"bezel-color", roundedHighlightedBezelColor, [CPThemeStateBordered, CPThemeStateHighlighted, CPButtonStateBezelStyleRounded]],
[@"bezel-color", roundedDisabledBezelColor, [CPThemeStateBordered, CPThemeStateDisabled, CPButtonStateBezelStyleRounded]],
@@ -528,6 +589,10 @@ var themedButtonValues = nil,
[@"min-size", CGSizeMake(0.0, 24.0)],
[@"max-size", CGSizeMake(-1.0, 24.0)],
[@"min-size", CGSizeMake(0.0, 20.0), CPThemeStateControlSizeSmall],
[@"max-size", CGSizeMake(-1.0, 20.0), CPThemeStateControlSizeSmall],
[@"min-size", CGSizeMake(0.0, 16.0), CPThemeStateControlSizeMini],
[@"max-size", CGSizeMake(-1.0, 16.0), CPThemeStateControlSizeMini],
[@"image-offset", CPButtonImageOffset]
];
@@ -569,7 +634,7 @@ var themedButtonValues = nil,
+ (CPPopUpButton)themedPopUpButton
{
var button = [[CPPopUpButton alloc] initWithFrame:CGRectMake(0.0, 0.0, 100.0, 24.0) pullsDown:NO],
color = PatternColor(
regularColor = PatternColor(
[
["popup-bezel-left.png", 3.0, 24.0],
["popup-bezel-center.png", 1.0, 24.0],
@@ -577,7 +642,7 @@ var themedButtonValues = nil,
],
PatternIsHorizontal),
disabledColor = PatternColor(
regularDisabledColor = PatternColor(
[
["popup-bezel-disabled-left.png", 3.0, 24.0],
["popup-bezel-disabled-center.png", 1.0, 24.0],
@@ -585,12 +650,32 @@ var themedButtonValues = nil,
],
PatternIsHorizontal),
smallColor = PatternColor(
"popup-bezel{state}{position}.png",
{
states: ["", "disabled"],
width: 3.0,
height: 20.0,
rightWidth: 19.0,
orientation: PatternIsHorizontal
}),
miniColor = PatternColor(
"popup-bezel{state}{position}.png",
{
states: ["", "disabled"],
width: 3.0,
height: 16.0,
rightWidth: 15.0,
orientation: PatternIsHorizontal
}),
themeValues =
[
[@"bezel-color", color, CPThemeStateBordered],
[@"bezel-color", disabledColor, [CPThemeStateBordered, CPThemeStateDisabled]],
[@"bezel-color", regularColor, CPThemeStateBordered],
[@"bezel-color", regularDisabledColor, [CPThemeStateBordered, CPThemeStateDisabled]],
[@"content-inset", CGInsetMake(0, 21.0 + 5.0, 0, 5.0), CPThemeStateBordered],
[@"content-inset", CGInsetMake(0, 22.0 + 5.0, 0, 5.0), CPThemeStateBordered],
[@"font", [CPFont boldSystemFontOfSize:CPFontCurrentSystemSize]],
[@"text-color", [CPColor colorWithCalibratedWhite:79.0 / 255.0 alpha:1.0]],
[@"text-shadow-color", [CPColor colorWithCalibratedWhite:240.0 / 255.0 alpha:1.0]],
@@ -599,7 +684,27 @@ var themedButtonValues = nil,
[@"text-shadow-color", [CPColor colorWithCalibratedWhite:240.0 / 255.0 alpha:0.6], [CPThemeStateBordered, CPThemeStateDisabled]],
[@"min-size", CGSizeMake(32.0, 24.0)],
[@"max-size", CGSizeMake(-1.0, 24.0)]
[@"max-size", CGSizeMake(-1.0, 24.0)],
// CPThemeStateControlSizeSmall
[@"bezel-color", smallColor["@"], [CPThemeStateControlSizeSmall, CPThemeStateBordered]],
[@"bezel-color", smallColor["disabled"], [CPThemeStateControlSizeSmall, CPThemeStateBordered, CPThemeStateDisabled]],
[@"content-inset", CGInsetMake(0, 17.0 + 4.0, 0, 4.0), [CPThemeStateControlSizeSmall, CPThemeStateBordered]],
[@"font", [CPFont boldSystemFontOfSize:11.0]],
[@"min-size", CGSizeMake(32.0, 20.0), CPThemeStateControlSizeSmall],
[@"max-size", CGSizeMake(-1.0, 20.0), CPThemeStateControlSizeSmall],
// CPThemeStateControlSizeMini
[@"bezel-color", miniColor["@"], [CPThemeStateControlSizeMini, CPThemeStateBordered]],
[@"bezel-color", miniColor["disabled"], [CPThemeStateControlSizeMini, CPThemeStateBordered, CPThemeStateDisabled]],
[@"content-inset", CGInsetMake(0, 15.0 + 4.0, 2.0, 4.0), [CPThemeStateControlSizeMini, CPThemeStateBordered]],
[@"font", [CPFont boldSystemFontOfSize:9.0]],
[@"min-size", CGSizeMake(32.0, 16.0), CPThemeStateControlSizeMini],
[@"max-size", CGSizeMake(-1.0, 16.0), CPThemeStateControlSizeMini]
];
[self registerThemeValues:themeValues forView:button];
@@ -1134,23 +1239,30 @@ var themedButtonValues = nil,
themeValues =
[
[@"bezel-color", bezelColor, CPThemeStateBezeled],
[@"bezel-color", bezelDisabledColor, [CPThemeStateBezeled, CPThemeStateDisabled]],
[@"bezel-color", bezelColor, CPThemeStateBezeled],
[@"bezel-color", bezelDisabledColor, [CPThemeStateBezeled, CPThemeStateDisabled]],
[@"font", [CPFont boldSystemFontOfSize:13.0]],
[@"text-color", [CPColor colorWithWhite:0.2 alpha:0.8]],
[@"text-color", textDisabledColor, CPThemeStateDisabled],
[@"text-color", textDisabledColor, CPThemeStateDisabled],
[@"content-inset", CGInsetMake(6.0, 0.0, 0.0, 3.0), CPThemeStateNormal],
[@"content-inset", CGInsetMake(6.0, 0.0, 0.0, 5.0), CPThemeStateBezeled],
[@"bezel-inset", CGInsetMake(0.0, -3.0, 0.0, -3.0), CPThemeStateBezeled],
[@"content-inset", CGInsetMake(6.0, 0.0, 0.0, 3.0), CPThemeStateNormal],
[@"content-inset", CGInsetMake(6.0, 0.0, 0.0, 5.0), CPThemeStateBezeled],
[@"content-inset", CGInsetMake(5.0, 0.0, 0.0, 3.0), [CPThemeStateControlSizeSmall, CPThemeStateNormal]],
[@"content-inset", CGInsetMake(5.0, 0.0, 0.0, 5.0), [CPThemeStateControlSizeSmall, CPThemeStateBezeled]],
[@"content-inset", CGInsetMake(5.0, 0.0, 0.0, 4.0), [CPThemeStateControlSizeMini, CPThemeStateNormal]],
[@"content-inset", CGInsetMake(5.0, 0.0, 0.0, 4.0), [CPThemeStateControlSizeMini, CPThemeStateBezeled]],
[@"datepicker-textfield-bezel-color", [CPColor clearColor], CPThemeStateNormal],
[@"datepicker-textfield-bezel-color", bezelColorDatePickerTextField, CPThemeStateSelected],
[@"datepicker-textfield-bezel-color", [CPColor clearColor], [CPThemeStateNormal, CPThemeStateDisabled]],
[@"datepicker-textfield-bezel-color", bezelColorDatePickerTextField, [CPThemeStateSelected, CPThemeStateDisabled]],
[@"bezel-inset", CGInsetMake(0.0, -3.0, 0.0, -3.0), CPThemeStateBezeled],
[@"datepicker-textfield-bezel-color", [CPColor clearColor], CPThemeStateNormal],
[@"datepicker-textfield-bezel-color", bezelColorDatePickerTextField, CPThemeStateSelected],
[@"datepicker-textfield-bezel-color", [CPColor clearColor], [CPThemeStateNormal, CPThemeStateDisabled]],
[@"datepicker-textfield-bezel-color", bezelColorDatePickerTextField, [CPThemeStateSelected, CPThemeStateDisabled]],
[@"min-size-datepicker-textfield", CGSizeMake(6.0, 18.0)],
[@"min-size-datepicker-textfield", CGSizeMake(6.0, 16.0), CPThemeStateControlSizeSmall],
[@"min-size-datepicker-textfield", CGSizeMake(6.0, 12.0), CPThemeStateControlSizeMini],
[@"separator-content-inset", CGInsetMake(0.0, -2.0, 0.0, -1.0)],
@@ -1159,11 +1271,18 @@ var themedButtonValues = nil,
[@"content-inset-datepicker-textfield", CGInsetMake(2.0, 2.0, 0.0, 1.0), CPThemeStateSelected],
[@"content-inset-datepicker-textfield-separator", CGInsetMake(2.0, 0.0, 0.0, 0.0), CPThemeStateSelected],
[@"date-hour-margin", 7.0],
[@"stepper-margin", 2.0],
[@"date-hour-margin", 7.0],
[@"date-hour-margin", 5.0, CPThemeStateControlSizeSmall],
[@"date-hour-margin", 2.0, CPThemeStateControlSizeMini],
[@"stepper-margin", 2.0],
[@"min-size", CGSizeMake(0.0, 29.0)],
[@"max-size", CGSizeMake(-1.0, 29.0)]
[@"max-size", CGSizeMake(-1.0, 29.0)],
[@"min-size", CGSizeMake(0, 26.0), CPThemeStateControlSizeSmall],
[@"max-size", CGSizeMake(-1.0, 26.0), CPThemeStateControlSizeSmall],
[@"min-size", CGSizeMake(0, 24.0), CPThemeStateControlSizeMini],
[@"max-size", CGSizeMake(-1.0, 24.0), CPThemeStateControlSizeMini]
];
[datePicker setDatePickerStyle:CPTextFieldDatePickerStyle];
@@ -1643,31 +1762,67 @@ var themedButtonValues = nil,
{
var button = [CPCheckBox checkBoxWithTitle:@"Another Option"],
imageNormal = PatternImage("check-box-image.png", 15.0, 16.0),
imageSelected = PatternImage("check-box-image-selected.png", 15.0, 16.0),
imageSelectedHighlighted = PatternImage("check-box-image-selected-highlighted.png", 15.0, 16.0),
imageSelectedDisabled = PatternImage("check-box-image-selected-disabled.png", 15.0, 16.0),
imageDisabled = PatternImage("check-box-image-disabled.png", 15.0, 16.0),
imageHighlighted = PatternImage("check-box-image-highlighted.png", 15.0, 16.0),
regularImageNormal = PatternImage("check-box-image.png", 15.0, 16.0),
regularImageSelected = PatternImage("check-box-image-selected.png", 15.0, 16.0),
regularImageSelectedHighlighted = PatternImage("check-box-image-selected-highlighted.png", 15.0, 16.0),
regularImageSelectedDisabled = PatternImage("check-box-image-selected-disabled.png", 15.0, 16.0),
regularImageDisabled = PatternImage("check-box-image-disabled.png", 15.0, 16.0),
regularImageHighlighted = PatternImage("check-box-image-highlighted.png", 15.0, 16.0),
smallImageNormal = PatternImage("check-box-image.png", 15.0, 16.0),
smallImageSelected = PatternImage("check-box-image-selected.png", 15.0, 16.0),
smallImageSelectedHighlighted = PatternImage("check-box-image-selected-highlighted.png", 15.0, 16.0),
smallImageSelectedDisabled = PatternImage("check-box-image-selected.png", 15.0, 16.0),
smallImageDisabled = PatternImage("check-box-image.png", 15.0, 16.0),
smallImageHighlighted = PatternImage("check-box-image-highlighted.png", 15.0, 16.0),
miniImageNormal = PatternImage("check-box-image.png", 13.0, 14.0),
miniImageSelected = PatternImage("check-box-image-selected.png", 13.0, 14.0),
miniImageSelectedHighlighted = PatternImage("check-box-image-selected-highlighted.png", 13.0, 14.0),
miniImageSelectedDisabled = PatternImage("check-box-image-selected.png", 13.0, 14.0),
miniImageDisabled = PatternImage("check-box-image.png", 13.0, 14.0),
miniImageHighlighted = PatternImage("check-box-image-highlighted.png", 13.0, 14.0),
themeValues =
[
[@"alignment", CPLeftTextAlignment, CPThemeStateNormal],
[@"content-inset", CGInsetMakeZero(), CPThemeStateNormal],
[@"alignment", CPLeftTextAlignment, CPThemeStateNormal],
[@"content-inset", CGInsetMakeZero(), CPThemeStateNormal],
[@"image", imageNormal, CPThemeStateNormal],
[@"image", imageSelected, CPThemeStateSelected],
[@"image", imageSelectedHighlighted, [CPThemeStateSelected, CPThemeStateHighlighted]],
[@"image", imageHighlighted, CPThemeStateHighlighted],
[@"image", imageDisabled, CPThemeStateDisabled],
[@"image", imageSelectedDisabled, [CPThemeStateSelected, CPThemeStateDisabled]],
[@"image", regularImageNormal, CPThemeStateNormal],
[@"image", regularImageSelected, CPThemeStateSelected],
[@"image", regularImageSelectedHighlighted, [CPThemeStateSelected, CPThemeStateHighlighted]],
[@"image", regularImageHighlighted, CPThemeStateHighlighted],
[@"image", regularImageDisabled, CPThemeStateDisabled],
[@"image", regularImageSelectedDisabled, [CPThemeStateSelected, CPThemeStateDisabled]],
[@"image-offset", CPCheckBoxImageOffset],
[@"font", [CPFont systemFontOfSize:CPFontCurrentSystemSize], CPThemeStateNormal],
[@"text-color", [CPColor colorWithCalibratedWhite:79.0 / 255.0 alpha:1.0], CPThemeStateDisabled],
[@"font", [CPFont systemFontOfSize:CPFontCurrentSystemSize], CPThemeStateNormal],
[@"text-color", [CPColor colorWithCalibratedWhite:79.0 / 255.0 alpha:1.0], CPThemeStateDisabled],
[@"min-size", CGSizeMake(0.0, 17.0)],
[@"max-size", CGSizeMake(-1.0, -1.0)]
[@"max-size", CGSizeMake(-1.0, -1.0)],
// CPThemeStateControlSizeSmall
[@"image", smallImageNormal, [CPThemeStateControlSizeSmall, CPThemeStateNormal]],
[@"image", smallImageSelected, [CPThemeStateControlSizeSmall, CPThemeStateSelected]],
[@"image", smallImageSelectedHighlighted, [CPThemeStateControlSizeSmall, CPThemeStateSelected, CPThemeStateHighlighted]],
[@"image", smallImageHighlighted, [CPThemeStateControlSizeSmall, CPThemeStateHighlighted]],
[@"image", smallImageDisabled, [CPThemeStateControlSizeSmall, CPThemeStateDisabled]],
[@"image", smallImageSelectedDisabled, [CPThemeStateControlSizeSmall, CPThemeStateSelected, CPThemeStateDisabled]],
[@"min-size", CGSizeMake(16.0, 16.0), CPThemeStateControlSizeSmall],
[@"max-size", CGSizeMake(-1.0, -1.0), CPThemeStateControlSizeSmall],
// CPThemeStateControlSizeMini
[@"image", miniImageNormal, [CPThemeStateControlSizeMini, CPThemeStateNormal]],
[@"image", miniImageSelected, [CPThemeStateControlSizeMini, CPThemeStateSelected]],
[@"image", miniImageSelectedHighlighted, [CPThemeStateControlSizeMini, CPThemeStateSelected, CPThemeStateHighlighted]],
[@"image", miniImageHighlighted, [CPThemeStateControlSizeMini, CPThemeStateHighlighted]],
[@"image", miniImageDisabled, [CPThemeStateControlSizeMini, CPThemeStateDisabled]],
[@"image", miniImageSelectedDisabled, [CPThemeStateControlSizeMini, CPThemeStateSelected, CPThemeStateDisabled]],
[@"min-size", CGSizeMake(13.0, 14.0), CPThemeStateControlSizeMini],
[@"max-size", CGSizeMake(-1.0, -1.0), CPThemeStateControlSizeMini]
];
[button setThemeState:CPThemeStateSelected];
@@ -2256,17 +2411,80 @@ var themedButtonValues = nil,
],
PatternIsHorizontal),
smallBezelUp = PatternColor(
"stepper-bezel-big{state}-up{position}.png",
{
states: ["", "highlighted", "disabled"],
width: 3.0,
height: 11.0,
centerWidth: 11.0,
orientation: PatternIsHorizontal
}),
smallBezelDown = PatternColor(
"stepper-bezel-big{state}-down{position}.png",
{
states: ["", "highlighted", "disabled"],
width: 3.0,
height: 10.0,
centerWidth: 11.0,
orientation: PatternIsHorizontal
}),
miniBezelUp = PatternColor(
"stepper-bezel-big{state}-up{position}.png",
{
states: ["", "highlighted", "disabled"],
width: 2.0,
height: 8.0,
centerWidth: 8.0,
orientation: PatternIsHorizontal
}),
miniBezelDown = PatternColor(
"stepper-bezel-big{state}-down{position}.png",
{
states: ["", "highlighted", "disabled"],
width: 2.0,
height: 7.0,
centerWidth: 8.0,
orientation: PatternIsHorizontal
}),
themeValues =
[
[@"bezel-color-up-button", bezelUp, CPThemeStateBordered],
[@"bezel-color-down-button", bezelDown, CPThemeStateBordered],
[@"bezel-color-up-button", bezelUpDisabled, [CPThemeStateBordered, CPThemeStateDisabled]],
[@"bezel-color-down-button", bezelDownDisabled, [CPThemeStateBordered, CPThemeStateDisabled]],
[@"bezel-color-up-button", bezelUpHighlighted, [CPThemeStateBordered, CPThemeStateHighlighted]],
[@"bezel-color-down-button", bezelDownHighlighted, [CPThemeStateBordered, CPThemeStateHighlighted]],
[@"min-size", CGSizeMake(25.0, 25.0)],
[@"bezel-color-up-button", bezelUp, CPThemeStateBordered],
[@"bezel-color-down-button", bezelDown, CPThemeStateBordered],
[@"bezel-color-up-button", bezelUpDisabled, [CPThemeStateBordered, CPThemeStateDisabled]],
[@"bezel-color-down-button", bezelDownDisabled, [CPThemeStateBordered, CPThemeStateDisabled]],
[@"bezel-color-up-button", bezelUpHighlighted, [CPThemeStateBordered, CPThemeStateHighlighted]],
[@"bezel-color-down-button", bezelDownHighlighted, [CPThemeStateBordered, CPThemeStateHighlighted]],
//[@"min-size", CGSizeMake(25.0, 25.0)],
[@"up-button-size", CGSizeMake(19.0, 13.0)],
[@"down-button-size", CGSizeMake(19.0, 12.0)]
[@"down-button-size", CGSizeMake(19.0, 12.0)],
// CPThemeStateControlSizeSmall
[@"bezel-color-up-button", smallBezelUp["@"], [CPThemeStateControlSizeSmall, CPThemeStateBordered]],
[@"bezel-color-down-button", smallBezelDown["@"], [CPThemeStateControlSizeSmall, CPThemeStateBordered]],
[@"bezel-color-up-button", smallBezelUp["disabled"], [CPThemeStateControlSizeSmall, CPThemeStateBordered, CPThemeStateDisabled]],
[@"bezel-color-down-button", smallBezelDown["disabled"], [CPThemeStateControlSizeSmall, CPThemeStateBordered, CPThemeStateDisabled]],
[@"bezel-color-up-button", smallBezelUp["highlighted"], [CPThemeStateControlSizeSmall, CPThemeStateBordered, CPThemeStateHighlighted]],
[@"bezel-color-down-button", smallBezelDown["highlighted"], [CPThemeStateControlSizeSmall, CPThemeStateBordered, CPThemeStateHighlighted]],
[@"up-button-size", CGSizeMake(17.0, 11.0), CPThemeStateControlSizeSmall],
[@"down-button-size", CGSizeMake(17.0, 10.0), CPThemeStateControlSizeSmall],
// CPThemeStateControlSizeMini
[@"bezel-color-up-button", miniBezelUp["@"], [CPThemeStateControlSizeMini, CPThemeStateBordered]],
[@"bezel-color-down-button", miniBezelDown["@"], [CPThemeStateControlSizeMini, CPThemeStateBordered]],
[@"bezel-color-up-button", miniBezelUp["disabled"], [CPThemeStateControlSizeMini, CPThemeStateBordered, CPThemeStateDisabled]],
[@"bezel-color-down-button", miniBezelDown["disabled"], [CPThemeStateControlSizeMini, CPThemeStateBordered, CPThemeStateDisabled]],
[@"bezel-color-up-button", miniBezelUp["highlighted"], [CPThemeStateControlSizeMini, CPThemeStateBordered, CPThemeStateHighlighted]],
[@"bezel-color-down-button", miniBezelDown["highlighted"], [CPThemeStateControlSizeMini, CPThemeStateBordered, CPThemeStateHighlighted]],
[@"up-button-size", CGSizeMake(12.0, 8.0), CPThemeStateControlSizeMini],
[@"down-button-size", CGSizeMake(12.0, 7.0), CPThemeStateControlSizeMini]
];
[self registerThemeValues:themeValues forView:stepper];
@@ -2296,7 +2514,8 @@ var themedButtonValues = nil,
[@"slice-last-bottom-border-color", sliceLastBottomBorderColor],
[@"font", [CPFont systemFontOfSize:10.0]],
[@"add-image", addImage],
[@"remove-image", removeImage]
[@"remove-image", removeImage],
[@"vertical-alignment", CPCenterVerticalTextAlignment]
];
[self registerThemeValues:ruleEditorThemedValues forView:ruleEditor];
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 B

File diff suppressed because it is too large Load Diff
@@ -0,0 +1,33 @@
/*
* AppController.j
* CPControlSize
*
* Created Christophe Serafin <christophe.serafin@gmail.com> You on August 11, 2014.
* Copyright 2014, All rights reserved.
*/
@import <Foundation/Foundation.j>
@import <AppKit/AppKit.j>
@implementation AppController : CPObject
{
@outlet CPWindow theWindow;
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
// This is called when the application is done loading.
}
- (void)awakeFromCib
{
// This is called when the cib is done loading.
// You can implement this method on any object instantiated from a Cib.
// It's a useful hook for setting up current UI values, and other things.
// In this case, we want the window from Cib to become our full browser window
[theWindow setFullPlatformWindow:YES];
}
@end
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Main cib file base name</key>
<string>MainMenu.cib</string>
<key>CPBundleName</key>
<string>CPControlSize</string>
<key>CPBundleVersion</key>
<string>1.0</string>
<key>CPHumanReadableCopyright</key>
<string>Copyright © 2014, All rights reserved.</string>
<key>CPDefaultTheme</key>
<string>Aristo2</string>
</dict>
</plist>
+184
View File
@@ -0,0 +1,184 @@
/*
* Jakefile
* CPControlSize
*
* Created by You on August 11, 2014.
* Copyright 2014, Your Company All rights reserved.
*/
var ENV = require("system").env,
FILE = require("file"),
JAKE = require("jake"),
task = JAKE.task,
FileList = JAKE.FileList,
app = require("cappuccino/jake").app,
configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug",
OS = require("os"),
projectName = "CPControlSize";
app (projectName, function(task)
{
ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks";
if (configuration === "Debug")
ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration);
task.setBuildIntermediatesPath(FILE.join("Build", "CPControlSize.build", configuration));
task.setBuildPath(FILE.join("Build", configuration));
task.setProductName("CPControlSize");
task.setIdentifier("com.yourcompany.CPControlSize");
task.setVersion("1.0");
task.setAuthor("Your Company");
task.setEmail("feedback @nospam@ yourcompany.com");
task.setSummary("CPControlSize");
task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**")));
task.setResources(new FileList("Resources/**"));
task.setIndexFilePath("index.html");
task.setInfoPlistPath("Info.plist");
if (configuration === "Debug")
task.setCompilerFlags("-DDEBUG -g");
else
task.setCompilerFlags("-O");
});
task ("default", [projectName], function()
{
printResults(configuration);
});
task ("build", ["default"], function()
{
updateApplicationSize();
});
task ("debug", function()
{
ENV["CONFIGURATION"] = "Debug";
JAKE.subjake(["."], "build", ENV);
});
task ("release", function()
{
ENV["CONFIGURATION"] = "Release";
JAKE.subjake(["."], "build", ENV);
});
task ("run", ["debug"], function()
{
OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]);
});
task ("run-release", ["release"], function()
{
OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]);
});
task ("deploy", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Deployment", projectName));
OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]);
printResults("Deployment")
});
task ("desktop", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Desktop", projectName));
require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", projectName), FILE.join("Build", "Desktop", projectName, "CPControlSize.app"));
printResults("Desktop")
});
task ("run-desktop", ["desktop"], function()
{
OS.system([FILE.join("Build", "Desktop", projectName, "CPControlSize.app", "Contents", "MacOS", "NativeHost"), "-i"]);
});
function printResults(configuration)
{
print("----------------------------");
print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName));
print("----------------------------");
}
function updateApplicationSize()
{
print("Calculating application file sizes...");
var contents = FILE.read(FILE.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), { charset:"UTF-8" }),
format = CFPropertyList.sniffedFormatOfString(contents),
plist = CFPropertyList.propertyListFromString(contents),
totalBytes = {executable:0, data:0, mhtml:0};
// Get the size of all framework executables and sprite data
var frameworksDir = "Frameworks";
if (ENV["CONFIGURATION"] === "Debug")
frameworksDir = FILE.join(frameworksDir, "Debug");
var frameworks = FILE.list(frameworksDir);
frameworks.forEach(function(framework)
{
if (framework !== "Source")
addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes);
});
// Read in the default theme name, and attempt to get its size
var themeName = plist.valueForKey("CPDefaultTheme") || "Aristo2",
themePath = nil;
if (themeName === "Aristo" || themeName === "Aristo2")
themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend");
else
themePath = FILE.join("Frameworks", "Resources", themeName + ".blend");
if (FILE.isDirectory(themePath))
addBundleFileSizes(themePath, totalBytes);
// Add sizes for the app
addBundleFileSizes(FILE.join("Build", ENV["CONFIGURATION"], projectName), totalBytes);
print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data));
var dict = new CFMutableDictionary();
dict.setValueForKey("executable", totalBytes.executable);
dict.setValueForKey("data", totalBytes.data);
dict.setValueForKey("mhtml", totalBytes.mhtml);
plist.setValueForKey("CPApplicationSize", dict);
FILE.write(FILE.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" });
}
function addBundleFileSizes(bundlePath, totalBytes)
{
var bundleName = FILE.basename(bundlePath),
environment = bundleName === "Foundation" ? "Objj" : "Browser",
bundlePath = FILE.join(bundlePath, environment + ".environment");
if (FILE.isDirectory(bundlePath))
{
var filename = bundleName + ".sj",
filePath = new FILE.Path(FILE.join(bundlePath, filename));
if (filePath.exists())
totalBytes.executable += filePath.size();
filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt"));
if (filePath.exists())
totalBytes.data += filePath.size();
filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt"));
if (filePath.exists())
totalBytes.mhtml += filePath.size();
filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt"));
if (filePath.exists())
totalBytes.mhtml += filePath.size();
}
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,545 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="13E28" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment version="1050" identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5056"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
<connections>
<outlet property="delegate" destination="450" id="451"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application"/>
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="371">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="335" y="390" width="507" height="529"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="878"/>
<view key="contentView" id="372">
<rect key="frame" x="0.0" y="0.0" width="507" height="529"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" id="y0e-V9-B4G">
<rect key="frame" x="-3" y="-3" width="513" height="535"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="axesIndependently" imageFrameStyle="grayBezel" image="grid" id="nys-hW-Rsd"/>
</imageView>
<popUpButton verticalHuggingPriority="750" id="x4W-un-0cD">
<rect key="frame" x="34" y="457" width="75" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="twp-s2-LmJ">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" title="OtherViews" id="fcN-Dl-IQ8">
<items>
<menuItem title="Item 1" id="hrm-kY-Djl"/>
<menuItem title="Item 2" id="vN5-gl-vNC"/>
<menuItem title="Item 3" id="UBd-Gc-0Ky"/>
</items>
</menu>
</popUpButtonCell>
</popUpButton>
<popUpButton verticalHuggingPriority="750" id="8xe-Ws-gbi">
<rect key="frame" x="203" y="462" width="76" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="fnw-t6-xXN">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
<menu key="menu" title="OtherViews" id="M83-F4-gI5">
<items>
<menuItem title="Item 1" id="9zU-LS-gn9"/>
<menuItem title="Item 2" id="rCx-5v-XF6"/>
<menuItem title="Item 3" id="fp3-dt-Bwk"/>
</items>
</menu>
</popUpButtonCell>
</popUpButton>
<popUpButton verticalHuggingPriority="750" id="GrQ-cT-p98">
<rect key="frame" x="374" y="469" width="73" height="15"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="mini" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="oG3-q6-b8X">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="miniSystem"/>
<menu key="menu" title="OtherViews" id="4Se-lq-nBs">
<items>
<menuItem title="Item 1" id="Vgs-PF-l1C"/>
<menuItem title="Item 2" id="9Re-nD-oss"/>
<menuItem title="Item 3" id="p8l-4o-Rh9"/>
</items>
</menu>
</popUpButtonCell>
</popUpButton>
<textField verticalHuggingPriority="750" id="duZ-4B-IHi">
<rect key="frame" x="36" y="419" width="96" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="uNM-6c-a5P">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" id="vYT-ma-Xce">
<rect key="frame" x="206" y="423" width="96" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="FYM-U3-I2Q">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="BGc-LU-OEi">
<rect key="frame" x="34" y="494" width="81" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Regular size" id="NcJ-HR-XZI">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="twC-Ez-Cvs">
<rect key="frame" x="204" y="497" width="67" height="14"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Small size" id="6uG-ec-HEA">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="dCc-cq-MO7">
<rect key="frame" x="373" y="500" width="60" height="11"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" controlSize="mini" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Mini size" id="mx4-66-yGt">
<font key="font" metaFont="miniSystem"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" id="Baf-Et-cEO">
<rect key="frame" x="375" y="426" width="96" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" controlSize="mini" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="8VU-QE-dZY">
<font key="font" metaFont="miniSystem"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<datePicker verticalHuggingPriority="750" id="pNn-Yt-Kof">
<rect key="frame" x="36" y="328" width="113" height="27"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<datePickerCell key="cell" borderStyle="bezel" alignment="left" id="T5R-AB-cuN">
<font key="font" metaFont="system"/>
<calendarDate key="date" timeIntervalSinceReferenceDate="-595929600" calendarFormat="%Y-%m-%d %H:%M:%S %z">
<!--1982-02-12 08:00:00 -0800-->
<timeZone key="timeZone" name="US/Pacific">
<data key="data">
VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ
y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ
5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g
8n/BkPNvwKD0X6OQ9U+ioPY/hZD3L4Sg+CiiEPkPZqD6CIQQ+viDIPvoZhD82GUg/chIEP64RyD/qCoQ
AJgpIAGIDBACeAsgA3EokARhJ6AFUQqQBkEJoAcw7JAHjUOgCRDOkAmtvyAK8LCQC+CvoAzZzRANwJGg
DrmvEA+priAQmZEQEYmQIBJ5cxATaXIgFFlVEBVJVCAWOTcQFyk2IBgiU5AZCRggGgI1kBryNKAb4heQ
HNIWoB3B+ZAesfigH6HbkCB2KyAhgb2QIlYNICNq2hAkNe8gJUq8ECYV0SAnKp4QJ/7toCkKgBAp3s+g
KupiECu+saAs036QLZ6ToC6zYJAvfnWgMJNCkDFnkiAycySQM0d0IDRTBpA1J1YgNjLokDcHOCA4HAUQ
OOcaIDn75xA6xvwgO9vJEDywGKA9u6sQPo/6oD+bjRBAb9ygQYSpkEJPvqBDZIuQRC+goEVEbZBF89Mg
Ry2KEEfTtSBJDWwQSbOXIErtThBLnLOgTNZqkE18laBOtkyQT1x3oFCWLpBRPFmgUnYQkFMcO6BUVfKQ
VPwdoFY11JBW5TogWB7xEFjFHCBZ/tMQWqT+IFvetRBchOAgXb6XEF5kwiBfnnkQYE3eoGGHlZBiLcCg
Y2d3kGQNoqBlR1mQZe2EoGcnO5BnzWagaQcdkGmtSKBq5v+Qa5ZlIGzQHBBtdkcgbq/+EG9WKSBwj+AQ
cTYLIHJvwhBzFe0gdE+kEHT/CaB2OMCQdt7roHgYopB4vs2gefiEkHqer6B72GaQfH6RoH24SJB+XnOg
f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA
</data>
</timeZone>
</calendarDate>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
</datePickerCell>
</datePicker>
<datePicker verticalHuggingPriority="750" id="WXE-xa-O7P">
<rect key="frame" x="206" y="333" width="113" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<datePickerCell key="cell" controlSize="small" borderStyle="bezel" alignment="left" id="Qb0-X9-0KQ">
<font key="font" metaFont="smallSystem"/>
<calendarDate key="date" timeIntervalSinceReferenceDate="-595929600" calendarFormat="%Y-%m-%d %H:%M:%S %z">
<!--1982-02-12 08:00:00 -0800-->
<timeZone key="timeZone" name="US/Pacific">
<data key="data">
VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ
y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ
5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g
8n/BkPNvwKD0X6OQ9U+ioPY/hZD3L4Sg+CiiEPkPZqD6CIQQ+viDIPvoZhD82GUg/chIEP64RyD/qCoQ
AJgpIAGIDBACeAsgA3EokARhJ6AFUQqQBkEJoAcw7JAHjUOgCRDOkAmtvyAK8LCQC+CvoAzZzRANwJGg
DrmvEA+priAQmZEQEYmQIBJ5cxATaXIgFFlVEBVJVCAWOTcQFyk2IBgiU5AZCRggGgI1kBryNKAb4heQ
HNIWoB3B+ZAesfigH6HbkCB2KyAhgb2QIlYNICNq2hAkNe8gJUq8ECYV0SAnKp4QJ/7toCkKgBAp3s+g
KupiECu+saAs036QLZ6ToC6zYJAvfnWgMJNCkDFnkiAycySQM0d0IDRTBpA1J1YgNjLokDcHOCA4HAUQ
OOcaIDn75xA6xvwgO9vJEDywGKA9u6sQPo/6oD+bjRBAb9ygQYSpkEJPvqBDZIuQRC+goEVEbZBF89Mg
Ry2KEEfTtSBJDWwQSbOXIErtThBLnLOgTNZqkE18laBOtkyQT1x3oFCWLpBRPFmgUnYQkFMcO6BUVfKQ
VPwdoFY11JBW5TogWB7xEFjFHCBZ/tMQWqT+IFvetRBchOAgXb6XEF5kwiBfnnkQYE3eoGGHlZBiLcCg
Y2d3kGQNoqBlR1mQZe2EoGcnO5BnzWagaQcdkGmtSKBq5v+Qa5ZlIGzQHBBtdkcgbq/+EG9WKSBwj+AQ
cTYLIHJvwhBzFe0gdE+kEHT/CaB2OMCQdt7roHgYopB4vs2gefiEkHqer6B72GaQfH6RoH24SJB+XnOg
f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA
</data>
</timeZone>
</calendarDate>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
</datePickerCell>
</datePicker>
<datePicker verticalHuggingPriority="750" id="WeD-S8-Zxs">
<rect key="frame" x="375" y="338" width="113" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<datePickerCell key="cell" controlSize="mini" borderStyle="bezel" alignment="left" id="635-rQ-aDe">
<font key="font" metaFont="miniSystem"/>
<calendarDate key="date" timeIntervalSinceReferenceDate="-595929600" calendarFormat="%Y-%m-%d %H:%M:%S %z">
<!--1982-02-12 08:00:00 -0800-->
<timeZone key="timeZone" name="US/Pacific">
<data key="data">
VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ
y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ
5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g
8n/BkPNvwKD0X6OQ9U+ioPY/hZD3L4Sg+CiiEPkPZqD6CIQQ+viDIPvoZhD82GUg/chIEP64RyD/qCoQ
AJgpIAGIDBACeAsgA3EokARhJ6AFUQqQBkEJoAcw7JAHjUOgCRDOkAmtvyAK8LCQC+CvoAzZzRANwJGg
DrmvEA+priAQmZEQEYmQIBJ5cxATaXIgFFlVEBVJVCAWOTcQFyk2IBgiU5AZCRggGgI1kBryNKAb4heQ
HNIWoB3B+ZAesfigH6HbkCB2KyAhgb2QIlYNICNq2hAkNe8gJUq8ECYV0SAnKp4QJ/7toCkKgBAp3s+g
KupiECu+saAs036QLZ6ToC6zYJAvfnWgMJNCkDFnkiAycySQM0d0IDRTBpA1J1YgNjLokDcHOCA4HAUQ
OOcaIDn75xA6xvwgO9vJEDywGKA9u6sQPo/6oD+bjRBAb9ygQYSpkEJPvqBDZIuQRC+goEVEbZBF89Mg
Ry2KEEfTtSBJDWwQSbOXIErtThBLnLOgTNZqkE18laBOtkyQT1x3oFCWLpBRPFmgUnYQkFMcO6BUVfKQ
VPwdoFY11JBW5TogWB7xEFjFHCBZ/tMQWqT+IFvetRBchOAgXb6XEF5kwiBfnnkQYE3eoGGHlZBiLcCg
Y2d3kGQNoqBlR1mQZe2EoGcnO5BnzWagaQcdkGmtSKBq5v+Qa5ZlIGzQHBBtdkcgbq/+EG9WKSBwj+AQ
cTYLIHJvwhBzFe0gdE+kEHT/CaB2OMCQdt7roHgYopB4vs2gefiEkHqer6B72GaQfH6RoH24SJB+XnOg
f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA
</data>
</timeZone>
</calendarDate>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
</datePickerCell>
</datePicker>
<datePicker verticalHuggingPriority="750" id="ULi-zW-Q5q">
<rect key="frame" x="36" y="281" width="113" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<datePickerCell key="cell" borderStyle="bezel" alignment="left" datePickerStyle="textField" id="RCm-sN-nrQ">
<font key="font" metaFont="system"/>
<calendarDate key="date" timeIntervalSinceReferenceDate="-595929600" calendarFormat="%Y-%m-%d %H:%M:%S %z">
<!--1982-02-12 08:00:00 -0800-->
<timeZone key="timeZone" name="US/Pacific">
<data key="data">
VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ
y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ
5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g
8n/BkPNvwKD0X6OQ9U+ioPY/hZD3L4Sg+CiiEPkPZqD6CIQQ+viDIPvoZhD82GUg/chIEP64RyD/qCoQ
AJgpIAGIDBACeAsgA3EokARhJ6AFUQqQBkEJoAcw7JAHjUOgCRDOkAmtvyAK8LCQC+CvoAzZzRANwJGg
DrmvEA+priAQmZEQEYmQIBJ5cxATaXIgFFlVEBVJVCAWOTcQFyk2IBgiU5AZCRggGgI1kBryNKAb4heQ
HNIWoB3B+ZAesfigH6HbkCB2KyAhgb2QIlYNICNq2hAkNe8gJUq8ECYV0SAnKp4QJ/7toCkKgBAp3s+g
KupiECu+saAs036QLZ6ToC6zYJAvfnWgMJNCkDFnkiAycySQM0d0IDRTBpA1J1YgNjLokDcHOCA4HAUQ
OOcaIDn75xA6xvwgO9vJEDywGKA9u6sQPo/6oD+bjRBAb9ygQYSpkEJPvqBDZIuQRC+goEVEbZBF89Mg
Ry2KEEfTtSBJDWwQSbOXIErtThBLnLOgTNZqkE18laBOtkyQT1x3oFCWLpBRPFmgUnYQkFMcO6BUVfKQ
VPwdoFY11JBW5TogWB7xEFjFHCBZ/tMQWqT+IFvetRBchOAgXb6XEF5kwiBfnnkQYE3eoGGHlZBiLcCg
Y2d3kGQNoqBlR1mQZe2EoGcnO5BnzWagaQcdkGmtSKBq5v+Qa5ZlIGzQHBBtdkcgbq/+EG9WKSBwj+AQ
cTYLIHJvwhBzFe0gdE+kEHT/CaB2OMCQdt7roHgYopB4vs2gefiEkHqer6B72GaQfH6RoH24SJB+XnOg
f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA
</data>
</timeZone>
</calendarDate>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
</datePickerCell>
</datePicker>
<datePicker verticalHuggingPriority="750" id="fx1-CP-l9m">
<rect key="frame" x="206" y="285" width="113" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<datePickerCell key="cell" controlSize="small" borderStyle="bezel" alignment="left" datePickerStyle="textField" id="0fE-Wg-6b6">
<font key="font" metaFont="smallSystem"/>
<calendarDate key="date" timeIntervalSinceReferenceDate="-595929600" calendarFormat="%Y-%m-%d %H:%M:%S %z">
<!--1982-02-12 08:00:00 -0800-->
<timeZone key="timeZone" name="US/Pacific">
<data key="data">
VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ
y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ
5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g
8n/BkPNvwKD0X6OQ9U+ioPY/hZD3L4Sg+CiiEPkPZqD6CIQQ+viDIPvoZhD82GUg/chIEP64RyD/qCoQ
AJgpIAGIDBACeAsgA3EokARhJ6AFUQqQBkEJoAcw7JAHjUOgCRDOkAmtvyAK8LCQC+CvoAzZzRANwJGg
DrmvEA+priAQmZEQEYmQIBJ5cxATaXIgFFlVEBVJVCAWOTcQFyk2IBgiU5AZCRggGgI1kBryNKAb4heQ
HNIWoB3B+ZAesfigH6HbkCB2KyAhgb2QIlYNICNq2hAkNe8gJUq8ECYV0SAnKp4QJ/7toCkKgBAp3s+g
KupiECu+saAs036QLZ6ToC6zYJAvfnWgMJNCkDFnkiAycySQM0d0IDRTBpA1J1YgNjLokDcHOCA4HAUQ
OOcaIDn75xA6xvwgO9vJEDywGKA9u6sQPo/6oD+bjRBAb9ygQYSpkEJPvqBDZIuQRC+goEVEbZBF89Mg
Ry2KEEfTtSBJDWwQSbOXIErtThBLnLOgTNZqkE18laBOtkyQT1x3oFCWLpBRPFmgUnYQkFMcO6BUVfKQ
VPwdoFY11JBW5TogWB7xEFjFHCBZ/tMQWqT+IFvetRBchOAgXb6XEF5kwiBfnnkQYE3eoGGHlZBiLcCg
Y2d3kGQNoqBlR1mQZe2EoGcnO5BnzWagaQcdkGmtSKBq5v+Qa5ZlIGzQHBBtdkcgbq/+EG9WKSBwj+AQ
cTYLIHJvwhBzFe0gdE+kEHT/CaB2OMCQdt7roHgYopB4vs2gefiEkHqer6B72GaQfH6RoH24SJB+XnOg
f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA
</data>
</timeZone>
</calendarDate>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
</datePickerCell>
</datePicker>
<datePicker verticalHuggingPriority="750" id="dwU-8f-1Ek">
<rect key="frame" x="375" y="287" width="110" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<datePickerCell key="cell" controlSize="mini" borderStyle="bezel" alignment="left" datePickerStyle="textField" id="O65-rh-JeL">
<font key="font" metaFont="miniSystem"/>
<calendarDate key="date" timeIntervalSinceReferenceDate="-595929600" calendarFormat="%Y-%m-%d %H:%M:%S %z">
<!--1982-02-12 08:00:00 -0800-->
<timeZone key="timeZone" name="US/Pacific">
<data key="data">
VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ
y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ
5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g
8n/BkPNvwKD0X6OQ9U+ioPY/hZD3L4Sg+CiiEPkPZqD6CIQQ+viDIPvoZhD82GUg/chIEP64RyD/qCoQ
AJgpIAGIDBACeAsgA3EokARhJ6AFUQqQBkEJoAcw7JAHjUOgCRDOkAmtvyAK8LCQC+CvoAzZzRANwJGg
DrmvEA+priAQmZEQEYmQIBJ5cxATaXIgFFlVEBVJVCAWOTcQFyk2IBgiU5AZCRggGgI1kBryNKAb4heQ
HNIWoB3B+ZAesfigH6HbkCB2KyAhgb2QIlYNICNq2hAkNe8gJUq8ECYV0SAnKp4QJ/7toCkKgBAp3s+g
KupiECu+saAs036QLZ6ToC6zYJAvfnWgMJNCkDFnkiAycySQM0d0IDRTBpA1J1YgNjLokDcHOCA4HAUQ
OOcaIDn75xA6xvwgO9vJEDywGKA9u6sQPo/6oD+bjRBAb9ygQYSpkEJPvqBDZIuQRC+goEVEbZBF89Mg
Ry2KEEfTtSBJDWwQSbOXIErtThBLnLOgTNZqkE18laBOtkyQT1x3oFCWLpBRPFmgUnYQkFMcO6BUVfKQ
VPwdoFY11JBW5TogWB7xEFjFHCBZ/tMQWqT+IFvetRBchOAgXb6XEF5kwiBfnnkQYE3eoGGHlZBiLcCg
Y2d3kGQNoqBlR1mQZe2EoGcnO5BnzWagaQcdkGmtSKBq5v+Qa5ZlIGzQHBBtdkcgbq/+EG9WKSBwj+AQ
cTYLIHJvwhBzFe0gdE+kEHT/CaB2OMCQdt7roHgYopB4vs2gefiEkHqer6B72GaQfH6RoH24SJB+XnOg
f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA
</data>
</timeZone>
</calendarDate>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
</datePickerCell>
</datePicker>
<stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" id="Pf5-bX-XNM">
<rect key="frame" x="33" y="374" width="19" height="27"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<stepperCell key="cell" continuous="YES" alignment="left" maxValue="100" id="UBb-vf-dHD"/>
</stepper>
<stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" id="fX5-Cx-kra">
<rect key="frame" x="204" y="381" width="15" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<stepperCell key="cell" controlSize="small" continuous="YES" alignment="left" maxValue="100" id="s3t-dy-wPz"/>
</stepper>
<stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" id="eJ6-cs-745">
<rect key="frame" x="373" y="388" width="13" height="15"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<stepperCell key="cell" controlSize="mini" continuous="YES" alignment="left" maxValue="100" id="RqJ-YK-TXI"/>
</stepper>
<button verticalHuggingPriority="750" id="qeW-JF-8PA">
<rect key="frame" x="30" y="192" width="82" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Button" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="r33-XP-TYJ">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
</button>
<button verticalHuggingPriority="750" id="bUw-8W-83b">
<rect key="frame" x="201" y="196" width="82" height="28"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Button" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="iFL-tR-EKi">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
</buttonCell>
</button>
<button verticalHuggingPriority="750" id="mtR-eh-GXS">
<rect key="frame" x="374" y="204" width="82" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Button" bezelStyle="rounded" alignment="center" controlSize="mini" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Ebs-LH-Vnq">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="miniSystem"/>
</buttonCell>
</button>
<button id="utt-sX-YI9">
<rect key="frame" x="34" y="238" width="81" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="Check" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="plS-mh-316">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
</button>
<button id="5tT-da-cbF">
<rect key="frame" x="203" y="237" width="75" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="Check" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="OGk-WN-tAu">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
</buttonCell>
</button>
<button id="wmA-RV-jeJ">
<rect key="frame" x="371" y="237" width="63" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="Check" bezelStyle="regularSquare" imagePosition="left" controlSize="mini" inset="2" id="ro6-1L-HbO">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="miniSystem"/>
</buttonCell>
</button>
<button verticalHuggingPriority="750" id="OuO-8D-Jv1">
<rect key="frame" x="36" y="155" width="110" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="squareTextured" title="Textured Button" bezelStyle="texturedSquare" imagePosition="overlaps" alignment="center" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="SNT-aA-bDy">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
</button>
<button verticalHuggingPriority="750" id="eG9-13-wdi">
<rect key="frame" x="206" y="160" width="110" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="squareTextured" title="Textured Button" bezelStyle="texturedSquare" imagePosition="overlaps" alignment="center" controlSize="small" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="xJm-nS-cPR">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
</buttonCell>
</button>
<button verticalHuggingPriority="750" id="7FL-7D-m2j">
<rect key="frame" x="375" y="163" width="110" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="squareTextured" title="Textured Button" bezelStyle="texturedSquare" imagePosition="overlaps" alignment="center" controlSize="mini" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="np3-qE-wIc">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="miniSystem"/>
</buttonCell>
</button>
<button verticalHuggingPriority="750" id="pqa-mo-oK1">
<rect key="frame" x="36" y="117" width="115" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" title="Round Textured" bezelStyle="texturedRounded" alignment="center" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="rpo-yw-hd8">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
</button>
<button verticalHuggingPriority="750" id="Mv6-Iy-X4h">
<rect key="frame" x="206" y="122" width="115" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" title="Round Textured" bezelStyle="texturedRounded" alignment="center" controlSize="small" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="PQW-Lc-Dm5">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
</buttonCell>
</button>
<button verticalHuggingPriority="750" id="O3l-BH-NXK">
<rect key="frame" x="375" y="125" width="115" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" title="Round Textured" bezelStyle="texturedRounded" alignment="center" controlSize="mini" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="fzh-RR-war">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="miniSystem"/>
</buttonCell>
</button>
<matrix verticalHuggingPriority="750" allowsEmptySelection="NO" autorecalculatesCellSize="YES" id="eUQ-61-gJI">
<rect key="frame" x="36" y="73" width="61" height="38"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
<size key="cellSize" width="58" height="18"/>
<size key="intercellSpacing" width="4" height="2"/>
<buttonCell key="prototype" type="radio" title="Radio" imagePosition="left" alignment="left" inset="2" id="b9B-FK-ORL">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<cells>
<column>
<buttonCell type="radio" title="Radio" imagePosition="left" alignment="left" state="on" tag="1" inset="2" id="yPV-N3-l7E">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<buttonCell type="radio" title="Radio" imagePosition="left" alignment="left" inset="2" id="Cqa-N2-FKj">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
</column>
</cells>
</matrix>
<matrix verticalHuggingPriority="750" allowsEmptySelection="NO" autorecalculatesCellSize="YES" id="IGX-cm-xbF">
<rect key="frame" x="206" y="73" width="82" height="38"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
<size key="cellSize" width="82" height="18"/>
<size key="intercellSpacing" width="4" height="2"/>
<buttonCell key="prototype" type="radio" title="Radio" imagePosition="left" alignment="left" controlSize="small" inset="2" id="Wc0-ah-hD0">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
</buttonCell>
<cells>
<column>
<buttonCell type="radio" title="Radio" imagePosition="left" alignment="left" controlSize="small" state="on" tag="1" inset="2" id="maf-wx-fVJ">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
</buttonCell>
<buttonCell type="radio" title="Radio" imagePosition="left" alignment="left" controlSize="small" inset="2" id="rxl-U7-ML4">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
</buttonCell>
</column>
</cells>
</matrix>
<matrix verticalHuggingPriority="750" allowsEmptySelection="NO" autorecalculatesCellSize="YES" id="SLm-Fm-NnP">
<rect key="frame" x="375" y="73" width="80" height="38"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
<size key="cellSize" width="80" height="18"/>
<size key="intercellSpacing" width="4" height="2"/>
<buttonCell key="prototype" type="radio" title="Radio" imagePosition="left" alignment="left" controlSize="mini" inset="2" id="CQl-UO-ilA">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="miniSystem"/>
</buttonCell>
<cells>
<column>
<buttonCell type="radio" title="Radio" imagePosition="left" alignment="left" controlSize="mini" state="on" tag="1" inset="2" id="9IN-el-UsO">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="miniSystem"/>
</buttonCell>
<buttonCell type="radio" title="Radio" imagePosition="left" alignment="left" controlSize="mini" inset="2" id="4PO-03-gDn">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="miniSystem"/>
</buttonCell>
</column>
</cells>
</matrix>
<comboBox verticalHuggingPriority="750" id="yfb-qa-Ypy">
<rect key="frame" x="36" y="35" width="99" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" completes="NO" numberOfVisibleItems="5" id="7lM-32-tfT">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</comboBoxCell>
</comboBox>
<comboBox verticalHuggingPriority="750" id="aGP-Sw-SGa">
<rect key="frame" x="206" y="38" width="99" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<comboBoxCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" completes="NO" numberOfVisibleItems="5" id="1HS-Qg-oau">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</comboBoxCell>
</comboBox>
<comboBox verticalHuggingPriority="750" id="Sub-ME-hYL">
<rect key="frame" x="375" y="41" width="99" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<comboBoxCell key="cell" controlSize="mini" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" completes="NO" numberOfVisibleItems="5" id="6Ao-lo-5FY">
<font key="font" metaFont="miniSystem"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</comboBoxCell>
</comboBox>
</subviews>
</view>
</window>
<customObject id="450" customClass="AppController">
<connections>
<outlet property="theWindow" destination="371" id="459"/>
</connections>
</customObject>
</objects>
<resources>
<image name="grid" width="351" height="300"/>
</resources>
</document>
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

+191
View File
@@ -0,0 +1,191 @@
<!DOCTYPE html>
<html lang="en">
<!--
index-debug.html
CPControlSize
Created by You on August 11, 2014.
Copyright 2014, Your Company All rights reserved.
-->
<head>
<meta charset="utf-8">
<!--[if lte IE 8]>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1">
<![endif]-->
<!--[if gte IE 9]>
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
<![endif]-->
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon" href="Resources/icon.png">
<link rel="apple-touch-startup-image" href="Resources/default.png">
<title>CPControlSize</title>
<!-- Custom javascript goes here -->
<!-- End custom javascript -->
<script type="text/javascript">
OBJJ_MAIN_FILE = "main.j";
OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks"];
var progressBar = null;
OBJJ_PROGRESS_CALLBACK = function(percent, appSize, path)
{
percent = percent * 100;
if (!progressBar)
progressBar = document.getElementById("progress-bar");
if (progressBar)
progressBar.style.width = Math.min(percent, 100) + "%";
}
var loadingHTML =
'<div id="loading">' +
' <div id="loading-text">Loading...</div>' +
' <div id="progress-indicator">' +
' <span id="progress-bar" style="width:0%"></span>' +
' </div>' +
'</div>';
</script>
<script type="text/javascript" src="Frameworks/Debug/Objective-J/Objective-J.js" charset="UTF-8"></script>
<script type="text/javascript">
objj_msgSend_reset();
// DEBUG OPTIONS:
// Uncomment to enable printing of backtraces on exceptions:
//objj_msgSend_decorate(objj_backtrace_decorator);
// Uncomment to supress exceptions that take place inside a message
//objj_msgSend_decorate(objj_supress_exceptions_decorator)
// Uncomment to enable runtime type checking:
//objj_msgSend_decorate(objj_typecheck_decorator);
// Uncomment (along with both above) to print backtraces on type check errors:
//objj_typecheck_prints_backtrace = true;
// Uncomment to disable the default logger (CPLogConsole if window.console exists, CPLogPopup otherwise):
//CPLogUnregister(CPLogDefault);
// Uncomment to enable a specific logger:
//CPLogRegister(CPLogConsole);
//CPLogRegister(CPLogPopup);
// Tag view DOM elements with a "data-cappuccino-view" attribute that contains
// the class name of the view that created them. Comment this or set to false to disable.
appkit_tag_dom_elements = true;
</script>
<style type="text/css">
html, body, h1, p {
margin: 0;
padding: 0;
}
/* We need a body wrapper because Cappuccino is unhappy if we change the body element */
#cappuccino-body {
/* Position it absolutely so it will fill the height without content */
position: absolute;
top: 0;
bottom: 0;
width: 100%;
/* Put it at the bottom of the stack so it doesn't interfere with UI */
z-index: -1000;
}
#cappuccino-body .container {
display: table;
margin: 0 auto;
height: 100%;
}
#cappuccino-body .content {
display: table-cell;
height: 100%;
vertical-align: top;
}
#loading {
position: relative;
top: 35%;
}
#loading-text {
height: 1.5em;
color: #555;
font: normal bold 36px/36px Arial, sans-serif;
}
#progress-indicator {
padding: 0px;
height: 16px;
border: 5px solid #555;
border-radius: 18px;
background-color: white;
}
#progress-bar {
position: relative;
top: -1px;
left: -1px;
display: block;
height: 18px;
/* Compensate for moving the bar left 1px to overlap the indicator border */
border-right: 1px solid #555;
background-color: #555;
}
#noscript {
position: relative;
top: 35%;
padding: 1em 1.5em;
border: 5px solid #555;
border-radius: 16px;
background-color: white;
color: #555;
text-align: center;
font: bold 24px Arial, sans-serif;
}
#noscript a {
color: #98c0ff;
text-decoration: none;
}
</style>
</head>
<body>
<div id="cappuccino-body">
<div class="container">
<div class="content">
<script type="text/javascript">
document.write(loadingHTML);
</script>
</div>
</div>
<noscript style="position:absolute; top:0; left:0; width:100%; height:100%">
<div class="container">
<div class="content">
<div id="noscript">
<p style="font-size:120%; margin-bottom:.75em">JavaScript is required for this site.</p>
<p><a href="http://www.enable-javascript.com" target="_blank">Enable JavaScript</a></p>
</div>
</div>
</div>
</noscript>
</div>
</body>
</html>
+161
View File
@@ -0,0 +1,161 @@
<!DOCTYPE html>
<html lang="en">
<!--
index.html
CPControlSize
Created by You on August 11, 2014.
Copyright 2014, Your Company All rights reserved.
-->
<head>
<meta charset="utf-8">
<!--[if lte IE 8]>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1">
<![endif]-->
<!--[if gte IE 9]>
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
<![endif]-->
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon" href="Resources/icon.png">
<link rel="apple-touch-startup-image" href="Resources/default.png">
<title>CPControlSize</title>
<!-- Custom javascript goes here -->
<!-- End custom javascript -->
<script type="text/javascript">
OBJJ_MAIN_FILE = "main.j";
var progressBar = null;
OBJJ_PROGRESS_CALLBACK = function(percent, appSize, path)
{
percent = percent * 100;
if (!progressBar)
progressBar = document.getElementById("progress-bar");
if (progressBar)
progressBar.style.width = Math.min(percent, 100) + "%";
}
var loadingHTML =
'<div id="loading">' +
' <div id="loading-text">Loading...</div>' +
' <div id="progress-indicator">' +
' <span id="progress-bar" style="width:0%"></span>' +
' </div>' +
'</div>';
</script>
<script type="text/javascript" src="Frameworks/Objective-J/Objective-J.js" charset="UTF-8"></script>
<style type="text/css">
html, body, h1, p {
margin: 0;
padding: 0;
}
/* We need a body wrapper because Cappuccino is unhappy if we change the body element */
#cappuccino-body {
/* Position it absolutely so it will fill the height without content */
position: absolute;
top: 0;
bottom: 0;
width: 100%;
/* Put it at the bottom of the stack so it doesn't interfere with UI */
z-index: -1000;
}
#cappuccino-body .container {
display: table;
margin: 0 auto;
height: 100%;
}
#cappuccino-body .content {
display: table-cell;
height: 100%;
vertical-align: top;
}
#loading {
position: relative;
top: 35%;
}
#loading-text {
height: 1.5em;
color: #555;
font: normal bold 36px/36px Arial, sans-serif;
}
#progress-indicator {
padding: 0px;
height: 16px;
border: 5px solid #555;
border-radius: 18px;
background-color: white;
}
#progress-bar {
position: relative;
top: -1px;
left: -1px;
display: block;
height: 18px;
/* Compensate for moving the bar left 1px to overlap the indicator border */
border-right: 1px solid #555;
background-color: #555;
}
#noscript {
position: relative;
top: 35%;
padding: 1em 1.5em;
border: 5px solid #555;
border-radius: 16px;
background-color: white;
color: #555;
text-align: center;
font: bold 24px Arial, sans-serif;
}
#noscript a {
color: #98c0ff;
text-decoration: none;
}
</style>
</head>
<body>
<div id="cappuccino-body">
<div class="container">
<div class="content">
<script type="text/javascript">
document.write(loadingHTML);
</script>
</div>
</div>
<noscript style="position:absolute; top:0; left:0; width:100%; height:100%">
<div class="container">
<div class="content">
<div id="noscript">
<p style="font-size:120%; margin-bottom:.75em">JavaScript is required for this site.</p>
<p><a href="http://www.enable-javascript.com" target="_blank">Enable JavaScript</a></p>
</div>
</div>
</div>
</noscript>
</div>
</body>
</html>
+18
View File
@@ -0,0 +1,18 @@
/*
* AppController.j
* CPControlSize
*
* Created by You on August 11, 2014.
* Copyright 2014, Your Company All rights reserved.
*/
@import <Foundation/Foundation.j>
@import <AppKit/AppKit.j>
@import "AppController.j"
function main(args, namedArgs)
{
CPApplicationMain(args, namedArgs);
}
File diff suppressed because one or more lines are too long
@@ -41,7 +41,7 @@
[self updateAddTemplateButton];
[window setBackgroundColor:[CPColor colorWithHexString:@"f3f4f5"]];
[window setFullBridge:YES];
[window setFullPlatformWindow:YES];
}
- (IBAction)predicateEditorAction:(id)sender
@@ -123,6 +123,14 @@
}
else if (type == 3)
template = [[CPPredicateEditorRowTemplate alloc] initWithLeftExpressions:leftExpressions rightExpressionAttributeType:CPDateAttributeType modifier:0 operators:operators options:0];
else if (type == 4)
template = [[CPPredicateEditorRowTemplate alloc] initWithLeftExpressions:leftExpressions rightExpressionAttributeType:CPBooleanAttributeType modifier:0 operators:operators options:0];
else if (type == 5)
{
var expressions = [CPArray arrayWithObjects:[CPExpression expressionForConstantValue:@"Apple"], [CPExpression expressionForConstantValue:@"Microsoft"], [CPExpression expressionForConstantValue:@"Linux"]]
template = [[CPPredicateEditorRowTemplate alloc] initWithLeftExpressions:leftExpressions rightExpressions:expressions modifier:0 operators:operators options:0];
}
var templates = [[predicateEditor rowTemplates] arrayByAddingObject:template];
[predicateEditor setRowTemplates:templates];
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="13E28" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4514"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5056"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication"/>
@@ -734,15 +734,17 @@
<popUpButton verticalHuggingPriority="750" id="1274">
<rect key="frame" x="6" y="145" width="223" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" title="Strings" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="1277" id="1275">
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="1275">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<font key="font" metaFont="menu"/>
<menu key="menu" title="OtherViews" id="1276">
<items>
<menuItem title="Strings" state="on" id="1277"/>
<menuItem title="Strings" id="1277"/>
<menuItem title="Numbers" id="1278"/>
<menuItem title="Constant Values" id="1279"/>
<menuItem title="Dates" id="9Za-l5-lSK"/>
<menuItem title="Booleans" id="Nuh-0m-Oqs"/>
<menuItem title="Choice" id="Ia8-PU-zQd"/>
</items>
</menu>
</popUpButtonCell>
@@ -928,4 +930,4 @@
</declaredKeys>
</objectController>
</objects>
</document>
</document>
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+180 -65
View File
@@ -25,6 +25,7 @@
@import <AppKit/CPButton.j>
@import <AppKit/CPCheckBox.j>
@import <AppKit/CPPopUpButton.j>
@import <AppKit/CPRadio.j>
@import "NSCell.j"
@@ -77,10 +78,7 @@ var NSButtonIsBorderedMask = 0x00800000,
{
[super NS_initWithCell:cell];
var alternateImage = [cell alternateImage],
positionOffsetSizeWidth = 0,
positionOffsetOriginX = 0,
positionOffsetOriginY = 0;
var alternateImage = [cell alternateImage];
if ([alternateImage isKindOfClass:[NSButtonImageSource class]])
{
@@ -111,85 +109,35 @@ var NSButtonIsBorderedMask = 0x00800000,
_title = [cell title];
_alternateTitle = [cell alternateTitle];
_controlSize = CPRegularControlSize;
[self setBordered:[cell isBordered]];
_bezelStyle = [cell bezelStyle];
var fixedHeight;
// Map Cocoa bezel styles to Cappuccino bezel styles and adjust frame
// Fix height
switch (_bezelStyle)
{
// implemented:
case CPRoundedBezelStyle: // Push IB style
positionOffsetOriginY = 6;
positionOffsetOriginX = 6;
positionOffsetSizeWidth = -12
fixedHeight = YES;
break;
case CPTexturedRoundedBezelStyle: // Round Textured IB style
positionOffsetOriginY = 2;
positionOffsetOriginX = -2;
positionOffsetSizeWidth = 0;
fixedHeight = YES;
break;
case CPHUDBezelStyle:
fixedHeight = YES;
break;
// approximations:
case CPRoundRectBezelStyle: // Round Rect IB style
positionOffsetOriginY = -3;
positionOffsetOriginX = -2;
positionOffsetSizeWidth = 0;
_bezelStyle = CPRoundedBezelStyle;
case CPRecessedBezelStyle: // Recessed IB style
fixedHeight = YES;
break;
case CPSmallSquareBezelStyle: // Gradient IB style
positionOffsetOriginX = -2;
positionOffsetSizeWidth = 0;
_bezelStyle = CPTexturedRoundedBezelStyle;
fixedHeight = NO;
break;
case CPThickSquareBezelStyle: // Bevel IB style
case CPThickerSquareBezelStyle:
case CPRegularSquareBezelStyle:
positionOffsetOriginY = 3;
positionOffsetOriginX = 0;
positionOffsetSizeWidth = -4;
_bezelStyle = CPTexturedRoundedBezelStyle;
fixedHeight = NO;
break;
case CPTexturedSquareBezelStyle: // Textured IB style
positionOffsetOriginY = 4;
positionOffsetOriginX = -1;
positionOffsetSizeWidth = -2;
_bezelStyle = CPTexturedRoundedBezelStyle;
fixedHeight = NO;
break;
case CPShadowlessSquareBezelStyle: // Square IB style
positionOffsetOriginY = 5;
positionOffsetOriginX = -2;
positionOffsetSizeWidth = 0;
_bezelStyle = CPTexturedRoundedBezelStyle;
fixedHeight = NO;
break;
case CPRecessedBezelStyle: // Recessed IB style
positionOffsetOriginY = -3;
positionOffsetOriginX = -2;
positionOffsetSizeWidth = 0;
_bezelStyle = CPHUDBezelStyle;
fixedHeight = YES;
break;
// unsupported
case CPRoundedDisclosureBezelStyle:
case CPHelpButtonBezelStyle:
@@ -222,6 +170,8 @@ var NSButtonIsBorderedMask = 0x00800000,
maxSize = [theme valueForAttributeWithName:@"max-size" forClass:[self class]],
adjustHeight = NO;
// CPLog.error([self class] + " Frame Adjustment = (" + frameAdjustment.origin.x + ", " + frameAdjustment.origin.y + ", " + frameAdjustment.size.width + ", " + frameAdjustment.size.width + ")")
if (minSize.height > 0 && maxSize.height > 0 && minSize.height === maxSize.height)
{
adjustHeight = YES;
@@ -245,15 +195,6 @@ var NSButtonIsBorderedMask = 0x00800000,
if (_frame.size.height !== oldHeight)
CPLog.debug("NSButton [%s]: adjusted height from %d to %d", _title == null ? "<no title>" : '"' + _title + '"', oldHeight, _frame.size.height);
}
if ([cell isBordered])
{
// Reposition the buttons according to its particular offsets
_frame.origin.x += positionOffsetOriginX;
_frame.origin.y += positionOffsetOriginY;
_frame.size.width += positionOffsetSizeWidth;
_bounds.size.width += positionOffsetSizeWidth;
}
}
_keyEquivalent = [cell keyEquivalent];
@@ -269,8 +210,182 @@ var NSButtonIsBorderedMask = 0x00800000,
_highlightsBy = [cell highlightsBy];
_showsStateBy = [cell showsStateBy];
[self _adjustNib2CibSize];
}
/*!
@ignore
Get frame adjustment for button and all its versions...
*/
- (CGRect)_nib2CibAdjustment
{
var frameAdjustment = [super _nib2CibAdjustment],
positionOffsetSizeWidth = 0,
positionOffsetOriginX = 0,
positionOffsetOriginY = 0;
// We want certain control like CPPopupButton to have their own nib2cib-adjustment-frame theme attribute
if (![self isBordered] || [self isKindOfClass:[CPPopUpButton class]])
return frameAdjustment;
// Map Cocoa bezel styles to Cappuccino bezel styles and adjust frame
switch (_bezelStyle)
{
// implemented:
case CPRoundedBezelStyle: // Push IB style
switch([self controlSize])
{
case CPMiniControlSize:
positionOffsetOriginX = 1;
positionOffsetOriginY = -5;
positionOffsetSizeWidth = -2;
break;
case CPSmallControlSize:
positionOffsetOriginX = 8;
positionOffsetOriginY = -5;
positionOffsetSizeWidth = -10;
break;
default:
case CPRegularControlSize:
positionOffsetOriginX = 4;
positionOffsetOriginY = -6;
positionOffsetSizeWidth = -12;
break;
}
break;
case CPTexturedRoundedBezelStyle: // Round Textured IB style
switch([self controlSize])
{
case CPMiniControlSize:
positionOffsetOriginX = 0;
positionOffsetOriginY = -5;
positionOffsetSizeWidth = 0;
break;
case CPSmallControlSize:
positionOffsetOriginX = 3;
positionOffsetOriginY = 0;
positionOffsetSizeWidth = 0;
break;
default:
case CPRegularControlSize:
positionOffsetOriginX = -2;
positionOffsetOriginY = -2;
positionOffsetSizeWidth = 0;
break;
}
break;
// approximations:
case CPRoundRectBezelStyle: // Round Rect IB style
switch([self controlSize])
{
case CPMiniControlSize:
positionOffsetOriginX = 0;
positionOffsetOriginY = -5;
positionOffsetSizeWidth = 0;
break;
case CPSmallControlSize:
positionOffsetOriginX = 3;
positionOffsetOriginY = 2;
positionOffsetSizeWidth = 0;
break;
default:
case CPRegularControlSize:
positionOffsetOriginX = -2;
positionOffsetOriginY = 3;
positionOffsetSizeWidth = 0;
break;
}
_bezelStyle = CPRoundedBezelStyle;
break;
case CPSmallSquareBezelStyle: // Gradient IB style
positionOffsetOriginX = -2;
positionOffsetSizeWidth = 0;
_bezelStyle = CPTexturedRoundedBezelStyle;
break;
case CPThickSquareBezelStyle: // Bevel IB style
case CPThickerSquareBezelStyle:
case CPRegularSquareBezelStyle:
positionOffsetOriginY = -3;
positionOffsetOriginX = 0;
positionOffsetSizeWidth = -4;
_bezelStyle = CPTexturedRoundedBezelStyle;
break;
case CPTexturedSquareBezelStyle: // Textured IB style
switch([self controlSize])
{
case CPMiniControlSize:
positionOffsetOriginX = 0;
positionOffsetOriginY = -5;
positionOffsetSizeWidth = 0;
break;
case CPSmallControlSize:
positionOffsetOriginX = 3;
positionOffsetOriginY = 0;
positionOffsetSizeWidth = 0;
break;
default:
case CPRegularControlSize:
positionOffsetOriginX = -1;
positionOffsetOriginY = -4;
positionOffsetSizeWidth = -2;
break;
}
_bezelStyle = CPTexturedRoundedBezelStyle;
break;
case CPShadowlessSquareBezelStyle: // Square IB style
positionOffsetOriginY = -5;
positionOffsetOriginX = -2;
positionOffsetSizeWidth = 0;
_bezelStyle = CPTexturedRoundedBezelStyle;
break;
case CPRecessedBezelStyle: // Recessed IB style
switch([self controlSize])
{
case CPMiniControlSize:
positionOffsetOriginX = 0;
positionOffsetOriginY = -5;
positionOffsetSizeWidth = 0;
break;
case CPSmallControlSize:
positionOffsetOriginX = 3;
positionOffsetOriginY = 2;
positionOffsetSizeWidth = 0;
break;
default:
case CPRegularControlSize:
positionOffsetOriginX = -2;
positionOffsetOriginY = 3;
positionOffsetSizeWidth = 0;
break;
}
_bezelStyle = CPHUDBezelStyle;
break;
}
return CGRectMake(frameAdjustment.origin.x + positionOffsetOriginX, frameAdjustment.origin.y + positionOffsetOriginY, frameAdjustment.size.width + positionOffsetSizeWidth, frameAdjustment.size.height);
}
@end
@implementation NSButton : CPButton
+1 -8
View File
@@ -53,14 +53,7 @@
size = [self frameSize],
widthOffset = -3;
// Adjust for differences between Cocoa and Cappuccino widget framing.
if ([theme name] == @"Aristo")
{
_frame.origin.x += 1;
widthOffset = -5;
}
[self setFrameSize:CGSizeMake(size.width + widthOffset, MIN(size.height, maxSize.height))];
[self _adjustNib2CibSize];
}
@end
+22
View File
@@ -26,6 +26,9 @@
@import "NSView.j"
@class Nib2Cib
@implementation CPControl (NSCoding)
- (id)NS_initWithCoder:(CPCoder)aCoder
@@ -61,6 +64,25 @@
[self setContinuous:[cell isContinuous]];
[self setLineBreakMode:[cell lineBreakMode]];
[self setFormatter:[cell formatter]];
[self setControlSize:[cell controlSize]];
}
- (CGRect)_nib2CibAdjustment
{
var theme = [Nib2Cib defaultTheme];
return [theme valueForAttributeWithName:@"nib2cib-adjustment-frame" inState:[self themeState] forClass:[self class]];
}
- (void)_adjustNib2CibSize
{
var frame = [self frame],
frameAdjustment = [self _nib2CibAdjustment];
if (frameAdjustment)
{
[self setFrameOrigin:CGPointMake(frame.origin.x + frameAdjustment.origin.x, frame.origin.y - frameAdjustment.origin.y + frameAdjustment.size.height)];
[self setFrameSize:CGSizeMake(frame.size.width + frameAdjustment.size.width, frame.size.height + frameAdjustment.size.height)];
}
}
@end
+17 -11
View File
@@ -59,6 +59,7 @@ var NSDatePickerDefaultSize = 22,
[self setBezeled:[cell isBezeled]];
[self setBordered:[cell isBordered]];
[self setEnabled:[cell isEnabled]];
[self setControlSize:[cell controlSize]];
var theme = [Nib2Cib defaultTheme];
@@ -90,14 +91,6 @@ var NSDatePickerDefaultSize = 22,
_frame.size.width = MIN(_frame.size.width, maxSize.width);
_bounds.size.width = MAX(_frame.size.width, minSize.width);
}
if (_datePickerStyle == CPTextFieldAndStepperDatePickerStyle)
{
_frame.size.width -= 3;
_bounds.size.width -= 3;
}
_frame.origin.y -= _frame.size.height - NSDatePickerDefaultSize - 4;
}
else
{
@@ -134,8 +127,6 @@ var NSDatePickerDefaultSize = 22,
_frame.size.width = MIN(_frame.size.width, maxSize.width);
_bounds.size.width = MAX(_frame.size.width, minSize.width);
}
_frame.origin.y -= _frame.size.height - NSDatePickerCalendarDefaultSize - 1;
}
if ([cell font]._name === IBDefaultFontFace && [[cell font] size] == IBDefaultFontSize)
@@ -154,6 +145,13 @@ var NSDatePickerDefaultSize = 22,
return self;
}
- (void)NS_initWithCell:(NSCell)cell
{
[super NS_initWithCell:cell];
[self _adjustNib2CibSize];
}
@end
@implementation NSDatePicker : CPDatePicker
@@ -162,7 +160,15 @@ var NSDatePickerDefaultSize = 22,
- (id)initWithCoder:(CPCoder)aCoder
{
return [super NS_initWithCoder:aCoder];
self = [super NS_initWithCoder:aCoder];
if (self)
{
var cell = [aCoder decodeObjectForKey:@"NSCell"];
[self NS_initWithCell:cell];
}
return self
}
- (Class)classForKeyedArchiver
+2
View File
@@ -39,6 +39,8 @@
[self setImageScaling:[cell imageScaling]];
[self setImageAlignment:[cell imageAlignment]];
_isEditable = [cell isEditable];
[self _adjustNib2CibSize];
}
@end
+2
View File
@@ -58,6 +58,8 @@
[self setEditable:[cell isEditable]];
[self setEnabled:[cell isEnabled]];
[self setContinuous:[cell isContinuous]];
[self _adjustNib2CibSize];
}
@end
+1 -5
View File
@@ -41,11 +41,7 @@
[self setPullsDown:[cell pullsDown]];
_preferredEdge = [cell preferredEdge];
// adjust the frame
_frame.origin.x -= 4;
_frame.origin.y -= 4;
_frame.size.width += 7;
_bounds.size.width += 7;
[self _adjustNib2CibSize];
}
@end
+1 -6
View File
@@ -43,12 +43,7 @@
[self setSendsWholeSearchString:[cell sendsWholeSearchString]];
[self setSendsSearchStringImmediately:[cell sendsSearchStringImmediately]];
if ([[Nib2Cib defaultTheme] name] === @"Aristo" && [self isBezeled])
{
// NSTextField.j makes the field +7.0 pixels tall. We want +8.0 to go to 30.
var frame = [self frame];
[self setFrameSize:CGSizeMake(frame.size.width, frame.size.height)];
}
[self _adjustNib2CibSize];
}
@end
+2
View File
@@ -44,6 +44,8 @@
_altIncrementValue = [cell altIncrementValue];
[self setSliderType:[cell sliderType]];
[self _adjustNib2CibSize];
}
@end
+1 -4
View File
@@ -43,10 +43,7 @@
self._autorepeat = [cell autorepeat];
self._objectValue = [cell objectValue];
// Convert Cocoa normal size to Cappuccino normal size.
self._frame.origin.y += 2;
self._frame.size.height -= 2;
self._bounds.size.height -= 2;
[self _adjustNib2CibSize];
}
@end
+3 -15
View File
@@ -26,6 +26,7 @@
@import "NSCell.j"
@import "NSControl.j"
@implementation CPTextField (NSCoding)
- (id)NS_initWithCoder:(CPCoder)aCoder
@@ -60,25 +61,12 @@
if (![textColor isEqual:defaultColor])
[self setTextColor:[cell textColor]];
// Only adjust the origin and size if this is a bezeled textfield.
// This ensures that labels positioned in IB are properly positioned after nibcib.
var frame = [self frame];
if ([self isBezeled])
{
[self setFrameOrigin:CGPointMake(frame.origin.x - 4.0, frame.origin.y - 3.0)];
[self setFrameSize:CGSizeMake(frame.size.width + 8.0, frame.size.height + 7.0)];
}
else
{
[self setFrameOrigin:CGPointMake(frame.origin.x + 3.0, frame.origin.y)];
[self setFrameSize:CGSizeMake(frame.size.width - 6.0, frame.size.height)];
}
CPLog.debug("NSTextField: title=\"" + [self stringValue] + "\", placeholder=" + ([cell placeholderString] == null ? "<none>" : '"' + [cell placeholderString] + '"') + ", isBordered=" + [self isBordered] + ", isBezeled=" + [self isBezeled] + ", bezelStyle=" + [self bezelStyle]);
if ([self formatter])
CPLog.debug(">> Formatter: " + [[self formatter] description]);
[self _adjustNib2CibSize];
}
@end
+2
View File
@@ -44,6 +44,8 @@
// Uncomment if we add support for token styles.
// _style = [cell tokenStyle];
[self _adjustNib2CibSize];
}
@end