mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
quickly switching between fades will now be consistent
This commit is contained in:
parent
ccf707e0b0
commit
0dd23e696c
1 changed files with 18 additions and 3 deletions
|
@ -114,7 +114,12 @@
|
||||||
|
|
||||||
[[self contentView] setOverlay: icon mainLine: name subLine: sizeString];
|
[[self contentView] setOverlay: icon mainLine: name subLine: sizeString];
|
||||||
|
|
||||||
|
//stop other animation and set to same progress
|
||||||
|
if ([fFadeOutAnimation isAnimating])
|
||||||
|
{
|
||||||
[fFadeOutAnimation stopAnimation];
|
[fFadeOutAnimation stopAnimation];
|
||||||
|
[fFadeInAnimation setCurrentProgress: 1.0 - [fFadeOutAnimation currentProgress]];
|
||||||
|
}
|
||||||
[self setFrame: [[self parentWindow] frame] display: YES];
|
[self setFrame: [[self parentWindow] frame] display: YES];
|
||||||
[fFadeInAnimation startAnimation];
|
[fFadeInAnimation startAnimation];
|
||||||
}
|
}
|
||||||
|
@ -124,7 +129,12 @@
|
||||||
[[self contentView] setOverlay: [NSImage imageNamed: @"Globe.tiff"]
|
[[self contentView] setOverlay: [NSImage imageNamed: @"Globe.tiff"]
|
||||||
mainLine: NSLocalizedString(@"Web Address", "Drag overlay -> url") subLine: url];
|
mainLine: NSLocalizedString(@"Web Address", "Drag overlay -> url") subLine: url];
|
||||||
|
|
||||||
|
//stop other animation and set to same progress
|
||||||
|
if ([fFadeOutAnimation isAnimating])
|
||||||
|
{
|
||||||
[fFadeOutAnimation stopAnimation];
|
[fFadeOutAnimation stopAnimation];
|
||||||
|
[fFadeInAnimation setCurrentProgress: 1.0 - [fFadeOutAnimation currentProgress]];
|
||||||
|
}
|
||||||
[self setFrame: [[self parentWindow] frame] display: YES];
|
[self setFrame: [[self parentWindow] frame] display: YES];
|
||||||
[fFadeInAnimation startAnimation];
|
[fFadeInAnimation startAnimation];
|
||||||
}
|
}
|
||||||
|
@ -132,8 +142,13 @@
|
||||||
- (void) fadeOut
|
- (void) fadeOut
|
||||||
{
|
{
|
||||||
if ([self alphaValue] > 0.0)
|
if ([self alphaValue] > 0.0)
|
||||||
|
{
|
||||||
|
//stop other animation and set to same progress
|
||||||
|
if ([fFadeInAnimation isAnimating])
|
||||||
{
|
{
|
||||||
[fFadeInAnimation stopAnimation];
|
[fFadeInAnimation stopAnimation];
|
||||||
|
[fFadeOutAnimation setCurrentProgress: 1.0 - [fFadeInAnimation currentProgress]];
|
||||||
|
}
|
||||||
[fFadeOutAnimation startAnimation];
|
[fFadeOutAnimation startAnimation];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue