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

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: Avi's 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 b468630c68077f5e2f4ca100ebdaeb71e038d8a1..9f9981e344a15909c08da350ec801342bf3299fc 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,17 @@ 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 = @{
+ NSViewAnimationTargetKey : chevronMenuButton_.get(),
+ NSViewAnimationEffectKey : animationEffect
+ };
[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