Merge branch 'master' into objj2integration

This commit is contained in:
Antoine Mercadal committed 2013-01-14 17:34:36 -08:00
commit 72a601371e
2 files changed
+12 -3

No files matched your search

+11 -2
View File
@@ -55,11 +55,15 @@
*/
+ (CPStepper)stepperWithInitialValue:(float)aValue minValue:(float)aMinValue maxValue:(float)aMaxValue
{
var stepper = [[CPStepper alloc] initWithFrame:_CGRectMake(0, 0, 19, 25)];
var stepper = [[CPStepper alloc] initWithFrame:_CGRectMakeZero()];
[stepper setDoubleValue:aValue];
[stepper setMinValue:aMinValue];
[stepper setMaxValue:aMaxValue];
// _sizeToFit will put the good size for the stepper depending of the current theme
[stepper _sizeToFit];
return stepper;
}
@@ -155,7 +159,7 @@
- (void)setFrame:(CGRect)aFrame
{
var upSize = [self valueForThemeAttribute:@"up-button-size"],
var upSize = [self valueForThemeAttribute:@"up-button-size"],
downSize = [self valueForThemeAttribute:@"down-button-size"],
minSize = _CGSizeMake(upSize.width, upSize.height + downSize.height),
frame = _CGRectMakeCopy(aFrame);
@@ -184,6 +188,11 @@
[_buttonDown setValue:[self valueForThemeAttribute:@"bezel-color-down-button" inState:CPThemeStateBordered | CPThemeStateHighlighted] forThemeAttribute:@"bezel-color" inState:CPThemeStateBordered | CPThemeStateHighlighted];
}
- (void)_sizeToFit
{
[self setFrame:CGRectMake([self frameOrigin].x, [self frameOrigin].y, 0, 0)];
}
/*!
Set if CPStepper should autorepeat.
@param shouldAutoRepeat if YES, the first mouse down does one increment (decrement) and, after each delay of 0.5 seconds
+1 -1
View File
@@ -631,7 +631,7 @@ var themedButtonValues = nil,
[@"content-inset", CGInsetMake(8.0, 7.0, 5.0, 8.0), CPThemeStateBezeled],
[@"content-inset", CGInsetMake(8.0, 7.0, 5.0, 8.0), CPThemeStateBezeled | CPThemeStateEditing],
[@"bezel-inset", CGInsetMake(3.0, 4.0, 3.0, 4.0), CPThemeStateBezeled],
[@"bezel-inset", CGInsetMake(1.0, 1.0, 1.0, 1.0), CPThemeStateBezeled | CPThemeStateEditing],
[@"bezel-inset", CGInsetMake(0.0, 1.0, 0.0, 1.0), CPThemeStateBezeled | CPThemeStateEditing],
[@"text-color", placeholderColor, CPTextFieldStatePlaceholder],