From ac68d670a2eecea5e65d5278bcef0be0a9786b68 Mon Sep 17 00:00:00 2001 From: Ross Boucher Date: Fri, 29 Jan 2010 22:11:43 -0800 Subject: [PATCH] Slight error in the sizing for the previous progress bar commit --- AppKit/CPProgressIndicator.j | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/AppKit/CPProgressIndicator.j b/AppKit/CPProgressIndicator.j index e44159e3f..a9502c418 100644 --- a/AppKit/CPProgressIndicator.j +++ b/AppKit/CPProgressIndicator.j @@ -427,7 +427,13 @@ var CPProgressIndicatorSpinningStyleColors = nil, CPProgressIndicatorStyleIdentifiers[_style], _CPControlIdentifierForControlSize(_controlSize))]; - [_barView setFrameSize:CGSizeMake(CGRectGetWidth([self bounds]) * (_doubleValue - _minValue) / (_maxValue - _minValue) - 4.0, 16.0)]; + var width = CGRectGetWidth([self bounds]), + barWidth = width * ((_doubleValue - _minValue) / (_maxValue - _minValue)); + + if (barWidth > 0.0 && barWidth < 4.0) + barWidth = 4.0; + + [_barView setFrameSize:CGSizeMake(barWidth, 16.0)]; } /* @ignore */