mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 16:20:58 +00:00
Some more progress indicator changes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38036 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5b0b613990
commit
98a33c53db
1 changed files with 16 additions and 28 deletions
|
@ -85,8 +85,6 @@
|
|||
{
|
||||
if (!_isIndeterminate && (_style == NSProgressIndicatorBarStyle))
|
||||
return;
|
||||
if ([self isHidden] == YES)
|
||||
return; // Don't update if hidden...
|
||||
|
||||
// Let this value overflow when it reachs the limit
|
||||
_count++;
|
||||
|
@ -128,9 +126,6 @@
|
|||
&& (_style == NSProgressIndicatorBarStyle)))
|
||||
return;
|
||||
|
||||
if ([self isHidden] && (_isDisplayedWhenStopped == YES))
|
||||
return;
|
||||
|
||||
_isRunning = YES;
|
||||
if (!_usesThreadedAnimation)
|
||||
{
|
||||
|
@ -165,11 +160,8 @@
|
|||
// Done automatically
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (_isDisplayedWhenStopped == NO)
|
||||
[self setHidden:YES];
|
||||
#endif
|
||||
_isRunning = NO;
|
||||
_count = 0;
|
||||
[self setNeedsDisplay: YES];
|
||||
}
|
||||
|
||||
|
@ -178,6 +170,13 @@
|
|||
return _usesThreadedAnimation;
|
||||
}
|
||||
|
||||
- (BOOL)isHidden
|
||||
{
|
||||
if ((_isRunning == NO) && (_isDisplayedWhenStopped == NO))
|
||||
return(YES);
|
||||
return([super isHidden]);
|
||||
}
|
||||
|
||||
- (void) setUsesThreadedAnimation: (BOOL)flag
|
||||
{
|
||||
if (_usesThreadedAnimation != flag)
|
||||
|
@ -342,17 +341,6 @@
|
|||
- (void) drawRect: (NSRect)rect
|
||||
{
|
||||
double val;
|
||||
|
||||
if (!_isRunning)
|
||||
{
|
||||
if (_isDisplayedWhenStopped == NO)
|
||||
{
|
||||
[[NSColor clearColor] setFill];
|
||||
NSRectFill(_bounds);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (_doubleValue < _minValue)
|
||||
val = 0.0;
|
||||
else if (_doubleValue > _maxValue)
|
||||
|
|
Loading…
Reference in a new issue