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

Side by Side Diff: ui/app_list/views/folder_background_view.cc

Issue 162363002: Use the new animation tween type for app list folder animation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/app_list/views/apps_grid_view.cc ('k') | ui/app_list/views/top_icon_animation_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/app_list/views/folder_background_view.h" 5 #include "ui/app_list/views/folder_background_view.h"
6 6
7 #include "ui/app_list/app_list_constants.h" 7 #include "ui/app_list/app_list_constants.h"
8 #include "ui/app_list/views/app_list_folder_view.h" 8 #include "ui/app_list/views/app_list_folder_view.h"
9 #include "ui/app_list/views/apps_container_view.h" 9 #include "ui/app_list/views/apps_container_view.h"
10 #include "ui/compositor/scoped_layer_animation_settings.h" 10 #include "ui/compositor/scoped_layer_animation_settings.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 } else { 48 } else {
49 layer()->SetOpacity(1.0f); 49 layer()->SetOpacity(1.0f);
50 layer()->SetTransform(gfx::Transform()); 50 layer()->SetTransform(gfx::Transform());
51 } 51 }
52 52
53 ui::ScopedLayerAnimationSettings settings(layer()->GetAnimator()); 53 ui::ScopedLayerAnimationSettings settings(layer()->GetAnimator());
54 settings.AddObserver(this); 54 settings.AddObserver(this);
55 settings.SetTransitionDuration( 55 settings.SetTransitionDuration(
56 base::TimeDelta::FromMilliseconds((kBubbleTransitionDurationMs))); 56 base::TimeDelta::FromMilliseconds((kBubbleTransitionDurationMs)));
57 if (show_state_ == SHOW_BUBBLE) { 57 if (show_state_ == SHOW_BUBBLE) {
58 settings.SetTweenType(gfx::Tween::EASE_OUT_2);
58 layer()->SetOpacity(1.0f); 59 layer()->SetOpacity(1.0f);
59 layer()->SetTransform(gfx::Transform()); 60 layer()->SetTransform(gfx::Transform());
60 } else { 61 } else {
62 settings.SetTweenType(gfx::Tween::EASE_IN_3);
61 layer()->SetOpacity(0.0f); 63 layer()->SetOpacity(0.0f);
62 layer()->SetTransform(transform); 64 layer()->SetTransform(transform);
63 } 65 }
64 66
65 SchedulePaint(); 67 SchedulePaint();
66 } 68 }
67 69
68 int FolderBackgroundView::GetFolderContainerBubbleRadius() const { 70 int FolderBackgroundView::GetFolderContainerBubbleRadius() const {
69 return GetContentsBounds().height() / 2; 71 return GetContentsBounds().height() / 2;
70 } 72 }
(...skipping 14 matching lines...) Expand all
85 87
86 void FolderBackgroundView::OnImplicitAnimationsCompleted() { 88 void FolderBackgroundView::OnImplicitAnimationsCompleted() {
87 // Show folder name after the ink bubble disappears. 89 // Show folder name after the ink bubble disappears.
88 if (show_state_ == HIDE_BUBBLE) { 90 if (show_state_ == HIDE_BUBBLE) {
89 static_cast<AppsContainerView*>(parent())->app_list_folder_view()-> 91 static_cast<AppsContainerView*>(parent())->app_list_folder_view()->
90 UpdateFolderNameVisibility(true); 92 UpdateFolderNameVisibility(true);
91 } 93 }
92 } 94 }
93 95
94 } // namespace app_list 96 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/apps_grid_view.cc ('k') | ui/app_list/views/top_icon_animation_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698