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

Unified Diff: ui/app_list/views/top_icon_animation_view.cc

Issue 694743002: Fix folder icon animation in app list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@launcher_page_api_do_actual_thing
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 | ui/gfx/transform_util.h » ('j') | ui/gfx/transform_util.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/top_icon_animation_view.cc
diff --git a/ui/app_list/views/top_icon_animation_view.cc b/ui/app_list/views/top_icon_animation_view.cc
index 1d6e2c50253ed6e8eba17695e1183b24cc1730bb..b356c9fa9c09f39f13d00f02b668ce91be31a86b 100644
--- a/ui/app_list/views/top_icon_animation_view.cc
+++ b/ui/app_list/views/top_icon_animation_view.cc
@@ -8,6 +8,7 @@
#include "ui/app_list/app_list_constants.h"
#include "ui/compositor/scoped_layer_animation_settings.h"
#include "ui/gfx/image/image_skia_operations.h"
+#include "ui/gfx/transform_util.h"
#include "ui/views/controls/image_view.h"
namespace app_list {
@@ -50,11 +51,7 @@ void TopIconAnimationView::TransformView() {
// Transform used for scaling down the icon and move it back inside to the
// original folder icon.
- const float kIconTransformScale = 0.33333f;
- gfx::Transform transform;
- transform.Translate(scaled_rect_.x() - layer()->bounds().x(),
- scaled_rect_.y() - layer()->bounds().y());
- transform.Scale(kIconTransformScale, kIconTransformScale);
+ gfx::Transform transform = gfx::GetRectTransform(bounds(), scaled_rect_);
if (open_folder_) {
// Transform to a scaled down icon inside the original folder icon.
« no previous file with comments | « no previous file | ui/gfx/transform_util.h » ('j') | ui/gfx/transform_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698