This repository has been archived by the owner on Mar 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add alternative, pretty (!) view for mini player
- Loading branch information
Showing
24 changed files
with
565 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* ExpandHoverView.h | ||
* | ||
* Created by Sajid Anwar. | ||
* | ||
* Subject to terms and conditions in LICENSE.md. | ||
* | ||
*/ | ||
|
||
#import <Cocoa/Cocoa.h> | ||
#import "Utilities.h" | ||
|
||
@interface ExpandHoverView : NSImageView | ||
|
||
@property (retain) NSTrackingArea *trackingArea; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* ExpandHoverView.m | ||
* | ||
* Created by Sajid Anwar. | ||
* | ||
* Subject to terms and conditions in LICENSE.md. | ||
* | ||
*/ | ||
|
||
#import "ExpandHoverView.h" | ||
|
||
@implementation ExpandHoverView | ||
|
||
@synthesize trackingArea; | ||
|
||
- (void)awakeFromNib | ||
{ | ||
[self setAlphaValue:0.0]; | ||
[self setImage:[Utilities imageFromName:@"arrow_expand_art"]]; | ||
} | ||
|
||
- (void)mouseEntered:(NSEvent *)theEvent | ||
{ | ||
[[self animator] setAlphaValue:1.0]; | ||
} | ||
|
||
- (void)mouseExited:(NSEvent *)theEvent | ||
{ | ||
[[self animator] setAlphaValue:0.0]; | ||
} | ||
|
||
- (void)updateTrackingAreas | ||
{ | ||
if (trackingArea != nil) { | ||
[self removeTrackingArea:trackingArea]; | ||
} | ||
|
||
int opts = (NSTrackingMouseEnteredAndExited | NSTrackingActiveAlways); | ||
trackingArea = [ [NSTrackingArea alloc] initWithRect:[self bounds] | ||
options:opts | ||
owner:self | ||
userInfo:nil]; | ||
[self addTrackingArea:trackingArea]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
b972f47
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The alternative player is something more minimal and nicer-looking, inspired by the concept for Nimblify 2.0. Normally, you will only see the album art itself, but the controls and the song information appear on hover. In order to reach the alternative mode, just click on the album art in the mini player.