Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1494)

Unified Diff: chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm

Issue 738213002: [Extensions Toolbar Mac] Fix chevron position after animation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
diff --git a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
index 495fb28428398f3bb156898e2b8c7966b6a8672c..bd40b7eda7b56abf907130030d7912e25e13a898 100644
--- a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
@@ -682,6 +682,7 @@ bool ToolbarActionsBarBridge::IsPopupRunning() const {
kBrowserActionOriginYOffset,
kChevronWidth,
ToolbarActionsBar::IconHeight());
+ [chevronAnimation_ stopAnimation];
[chevronMenuButton_ setFrame:buttonFrame];
}
@@ -722,19 +723,18 @@ bool ToolbarActionsBarBridge::IsPopupRunning() const {
return;
}
- NSDictionary* animationDictionary;
+ NSString* animationEffect;
if (hidden) {
- animationDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
- chevronMenuButton_.get(), NSViewAnimationTargetKey,
- NSViewAnimationFadeOutEffect, NSViewAnimationEffectKey,
- nil];
+ animationEffect = NSViewAnimationFadeOutEffect;
} else {
[chevronMenuButton_ setHidden:NO];
- animationDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
- chevronMenuButton_.get(), NSViewAnimationTargetKey,
- NSViewAnimationFadeInEffect, NSViewAnimationEffectKey,
- nil];
+ animationEffect = NSViewAnimationFadeInEffect;
}
+ NSDictionary* animationDictionary =
+ [NSDictionary dictionaryWithObjectsAndKeys:
+ chevronMenuButton_.get(), NSViewAnimationTargetKey,
+ animationEffect, NSViewAnimationEffectKey,
+ nil];
Avi (use Gerrit) 2014/11/20 00:46:48 NSDictionary* animationDictionary = @{ NSViewAni
Devlin 2014/11/20 21:13:02 ah, right, fancy new literals. Done.
[chevronAnimation_ setViewAnimations:
[NSArray arrayWithObject:animationDictionary]];
[chevronAnimation_ startAnimation];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698