Make sliders work with nib2cib again

This commit is contained in:
Ross Boucher
2009-04-22 12:04:47 -07:00
parent 2e32688ad6
commit f9640fb99e
+13
View File
@@ -38,8 +38,18 @@
self = [super NS_initWithCoder:aCoder];
if (self)
{
_altIncrementValue = [cell altIncrementValue];
[self setSliderType:[cell sliderType]];
if ([self sliderType] === CPCircularSlider)
{
var frame = [self frame];
[self setFrameSize:CGSizeMake(frame.size.width + 4.0, frame.size.height + 2.0)];
}
}
return self;
}
@@ -67,6 +77,7 @@
double _maxValue @accessors(readonly, getter=maxValue);
double _altIncrementValue @accessors(readonly, getter=altIncrementValue);
BOOL _vertical @accessors(readonly, getter=isVertical);
int _sliderType @accessors(readonly, getter=sliderType);
}
- (id)initWithCoder:(CPCoder)aCoder
@@ -81,6 +92,8 @@
_maxValue = [aCoder decodeDoubleForKey:@"NSMaxValue"];
_altIncrementValue = [aCoder decodeDoubleForKey:@"NSAltIncValue"];
_isVertical = [aCoder decodeBoolForKey:@"NSVertical"];
_sliderType = [aCoder decodeIntForKey:@"NSSliderType"] || 0;
}
return self;