git.ithinksw.org
/
MenuTunes.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Album art is integrated, but as an NSAppleScript right now. Must switch
[MenuTunes.git]
/
StatusWindow.m
diff --git
a/StatusWindow.m
b/StatusWindow.m
index
8377ac0
..
a456861
100755
(executable)
--- a/
StatusWindow.m
+++ b/
StatusWindow.m
@@
-45,7
+45,7
@@
// Set default values.
_image = [[NSImage imageNamed:@"NSApplicationIcon"] retain];
_locked = NO;
// Set default values.
_image = [[NSImage imageNamed:@"NSApplicationIcon"] retain];
_locked = NO;
- _sizing = StatusWindowRegular;
+ _sizing =
ITTransient
StatusWindowRegular;
}
return self;
}
return self;
@@
-75,7
+75,7
@@
[self setExitMode:(flag ? ITTransientStatusWindowExitOnCommand : ITTransientStatusWindowExitAfterDelay)];
}
[self setExitMode:(flag ? ITTransientStatusWindowExitOnCommand : ITTransientStatusWindowExitAfterDelay)];
}
-- (void)setSizing:(StatusWindowSizing)newSizing
+- (void)setSizing:(
ITTransient
StatusWindowSizing)newSizing
{
_sizing = newSizing;
}
{
_sizing = newSizing;
}
@@
-121,10
+121,12
@@
float excessHeight = 0.0;
NSPoint windowOrigin;
ITImageView *imageView;
float excessHeight = 0.0;
NSPoint windowOrigin;
ITImageView *imageView;
-
- if ( _sizing == StatusWindowSmall ) {
+ BOOL shouldAnimate = ( ! (([self visibilityState] == ITWindowAppearingState) ||
+ ([self visibilityState] == ITWindowVanishingState)) );
+
+ if ( _sizing == ITTransientStatusWindowSmall ) {
divisor = SMALL_DIVISOR;
divisor = SMALL_DIVISOR;
- } else if ( _sizing == StatusWindowMini ) {
+ } else if ( _sizing ==
ITTransient
StatusWindowMini ) {
divisor = MINI_DIVISOR;
}
divisor = MINI_DIVISOR;
}
@@
-173,7
+175,7
@@
[self setFrame:NSMakeRect( windowOrigin.x,
windowOrigin.y,
windowWidth,
[self setFrame:NSMakeRect( windowOrigin.x,
windowOrigin.y,
windowWidth,
- windowHeight) display:YES animate:
YES
];
+ windowHeight) display:YES animate:
shouldAnimate
];
[[[self contentView] subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)];
[[[self contentView] subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)];
@@
-182,9
+184,10
@@
((SW_PAD / divisor) + ((contentHeight - imageHeight) / 2)),
imageWidth,
imageHeight );
((SW_PAD / divisor) + ((contentHeight - imageHeight) / 2)),
imageWidth,
imageHeight );
- imageView = [[[
NS
ImageView alloc] initWithFrame:imageRect] autorelease];
+ imageView = [[[
IT
ImageView alloc] initWithFrame:imageRect] autorelease];
[imageView setAutoresizingMask:(NSViewMinYMargin | NSViewMaxYMargin)];
[imageView setImage:_image];
[imageView setAutoresizingMask:(NSViewMinYMargin | NSViewMaxYMargin)];
[imageView setImage:_image];
+ [imageView setCastsShadow:YES];
[[self contentView] addSubview:imageView];
return NSMakeRect( ((SW_PAD / divisor) + imageWidth + (SW_SPACE / divisor)),
[[self contentView] addSubview:imageView];
return NSMakeRect( ((SW_PAD / divisor) + imageWidth + (SW_SPACE / divisor)),
@@
-209,9
+212,9
@@
NSFont *font;
NSDictionary *attr;
NSFont *font;
NSDictionary *attr;
- if ( _sizing == StatusWindowSmall ) {
+ if ( _sizing ==
ITTransient
StatusWindowSmall ) {
divisor = SMALL_DIVISOR;
divisor = SMALL_DIVISOR;
- } else if ( _sizing == StatusWindowMini ) {
+ } else if ( _sizing ==
ITTransient
StatusWindowMini ) {
divisor = MINI_DIVISOR;
}
divisor = MINI_DIVISOR;
}
@@
-276,9
+279,9
@@
NSColor *offColor = [NSColor colorWithCalibratedWhite:0.15 alpha:0.50];
NSMatrix *volMatrix;
NSColor *offColor = [NSColor colorWithCalibratedWhite:0.15 alpha:0.50];
NSMatrix *volMatrix;
- if ( _sizing == StatusWindowSmall ) {
+ if ( _sizing ==
ITTransient
StatusWindowSmall ) {
divisor = SMALL_DIVISOR;
divisor = SMALL_DIVISOR;
- } else if ( _sizing == StatusWindowMini ) {
+ } else if ( _sizing ==
ITTransient
StatusWindowMini ) {
divisor = MINI_DIVISOR;
}
divisor = MINI_DIVISOR;
}