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

Side by Side Diff: ui/views/corewm/window_animations.cc

Issue 11411283: Fix the scale pivot for views corewm hide window animations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/views/corewm/window_animations.h" 5 #include "ui/views/corewm/window_animations.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 DEFINE_WINDOW_PROPERTY_KEY(float, 59 DEFINE_WINDOW_PROPERTY_KEY(float,
60 kWindowVisibilityAnimationVerticalPositionKey, 60 kWindowVisibilityAnimationVerticalPositionKey,
61 kWindowAnimation_Vertical_TranslateY); 61 kWindowAnimation_Vertical_TranslateY);
62 62
63 namespace { 63 namespace {
64 64
65 const int kDefaultAnimationDurationForMenuMS = 150; 65 const int kDefaultAnimationDurationForMenuMS = 150;
66 66
67 const float kWindowAnimation_HideOpacity = 0.f; 67 const float kWindowAnimation_HideOpacity = 0.f;
68 const float kWindowAnimation_ShowOpacity = 1.f; 68 const float kWindowAnimation_ShowOpacity = 1.f;
69 const float kWindowAnimation_TranslateFactor = 0.025f; 69 const float kWindowAnimation_TranslateFactor = 0.5f;
70 const float kWindowAnimation_ScaleFactor = .95f; 70 const float kWindowAnimation_ScaleFactor = .95f;
71 71
72 const int kWindowAnimation_Rotate_DurationMS = 180; 72 const int kWindowAnimation_Rotate_DurationMS = 180;
73 const int kWindowAnimation_Rotate_OpacityDurationPercent = 90; 73 const int kWindowAnimation_Rotate_OpacityDurationPercent = 90;
74 const float kWindowAnimation_Rotate_TranslateY = -20.f; 74 const float kWindowAnimation_Rotate_TranslateY = -20.f;
75 const float kWindowAnimation_Rotate_PerspectiveDepth = 500.f; 75 const float kWindowAnimation_Rotate_PerspectiveDepth = 500.f;
76 const float kWindowAnimation_Rotate_DegreesX = 5.f; 76 const float kWindowAnimation_Rotate_DegreesX = 5.f;
77 const float kWindowAnimation_Rotate_ScaleFactor = .99f; 77 const float kWindowAnimation_Rotate_ScaleFactor = .99f;
78 78
79 const float kWindowAnimation_Bounce_Scale = 1.02f; 79 const float kWindowAnimation_Bounce_Scale = 1.02f;
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 485
486 bool WindowAnimationsDisabled(aura::Window* window) { 486 bool WindowAnimationsDisabled(aura::Window* window) {
487 return (window && 487 return (window &&
488 window->GetProperty(aura::client::kAnimationsDisabledKey)) || 488 window->GetProperty(aura::client::kAnimationsDisabledKey)) ||
489 CommandLine::ForCurrentProcess()->HasSwitch( 489 CommandLine::ForCurrentProcess()->HasSwitch(
490 switches::kWindowAnimationsDisabled); 490 switches::kWindowAnimationsDisabled);
491 } 491 }
492 492
493 } // namespace corewm 493 } // namespace corewm
494 } // namespace views 494 } // namespace views
OLDNEW
« 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