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

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm

Issue 110753004: Add a missing animation context to bookmark bar controller. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: initial Created 7 years 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/bookmarks/bookmark_bar_controller.mm
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
index c680f1987efb817cc4a944a4e3cb358f056b23a8..0c8f5a65816c732859b081e188aed7ae34e36a0e 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
@@ -129,6 +129,7 @@ namespace {
// Duration of the bookmark bar animations.
const NSTimeInterval kBookmarkBarAnimationDuration = 0.12;
+const NSTimeInterval kDragAndDropAnimationDuration = 0.25;
void RecordAppLaunch(Profile* profile, GURL url) {
DCHECK(profile->GetExtensionService());
@@ -1946,6 +1947,9 @@ static BOOL ValueInRangeInclusive(CGFloat low, CGFloat value, CGFloat high) {
}
// Put all the buttons where they belong, with all buttons to the right
// of the insertion point shuffling right to make space for it.
+ [NSAnimationContext beginGrouping];
+ [[NSAnimationContext currentContext]
+ setDuration:kDragAndDropAnimationDuration];
for (NSButton* button in buttons_.get()) {
// Hidden buttons get no space.
if ([button isHidden])
@@ -1962,6 +1966,7 @@ static BOOL ValueInRangeInclusive(CGFloat low, CGFloat value, CGFloat high) {
else
[button setFrame:buttonFrame];
}
+ [NSAnimationContext endGrouping];
}
}
« 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