Skip to content
This repository has been archived by the owner on Sep 4, 2018. It is now read-only.

fix detail button opacity animations #90

Merged
merged 7 commits into from
Nov 21, 2013
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
improve naming for button-highlighting method
  • Loading branch information
jurre committed Nov 21, 2013
commit 9ea71693cd2df685be85e1481e4afb046201df56
10 changes: 5 additions & 5 deletions Alcatraz/Views/ATZPackageTableCellView.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ - (void)awakeFromNib {
[self createTrackingArea];
}

- (void)setButtonsVisible:(BOOL)visible animated:(BOOL)animated {
float alphaValue = visible ? 1.0f : 0.5f;
- (void)setButtonsHighlighted:(BOOL)highlighted animated:(BOOL)animated {
float alphaValue = highlighted ? 1.0f : 0.5f;

id buttonsContainerView = animated ? self.buttonContainerView.animator : self.buttonContainerView;

Expand All @@ -48,7 +48,7 @@ - (void)setButtonsVisible:(BOOL)visible animated:(BOOL)animated {

- (void)viewWillDraw {
[self.websiteButton setToolTip:[(ATZPackage *)self.objectValue website]];
[self setButtonsVisible:self.isHighlighted animated:NO];
[self setButtonsHighlighted:self.isHighlighted animated:NO];
}

- (void)mouseEntered:(NSEvent *)theEvent {
Expand All @@ -57,7 +57,7 @@ - (void)mouseEntered:(NSEvent *)theEvent {

- (void)mouseExited:(NSEvent *)theEvent {
self.isHighlighted = NO;
[self setButtonsVisible:NO animated:YES];
[self setButtonsHighlighted:NO animated:YES];
}

- (void)mouseMoved:(NSEvent *)theEvent {
Expand All @@ -84,7 +84,7 @@ - (void)showButtonsIfNeeded {
NSPoint windowLocation = [self.window convertScreenToBase:globalLocation];
NSPoint viewLocation = [self convertPoint:windowLocation fromView:nil];
if(NSPointInRect(viewLocation, self.bounds)) {
[self setButtonsVisible:YES animated:YES];
[self setButtonsHighlighted:YES animated:YES];
}
}

Expand Down