diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-22 18:54:11 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-22 18:54:11 +0000 |
commit | 1aab6b89de5989369e1ceecda0a3b6af056e2f89 (patch) | |
tree | 2f0c32501a24a81ea94702f4f1c83144959bbc9e /chrome/browser/gtk/slide_animator_gtk.cc | |
parent | 501093ab1b859c11d1a89b286e46f7fc12eeb9c3 (diff) | |
download | chromium_src-1aab6b89de5989369e1ceecda0a3b6af056e2f89.zip chromium_src-1aab6b89de5989369e1ceecda0a3b6af056e2f89.tar.gz chromium_src-1aab6b89de5989369e1ceecda0a3b6af056e2f89.tar.bz2 |
Add new item animation to download shelf.
Also, fix duration and tween type for download shelf open animation.
Review URL: http://codereview.chromium.org/88064
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14220 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/slide_animator_gtk.cc')
-rw-r--r-- | chrome/browser/gtk/slide_animator_gtk.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/gtk/slide_animator_gtk.cc b/chrome/browser/gtk/slide_animator_gtk.cc index e77756e..083d1e2 100644 --- a/chrome/browser/gtk/slide_animator_gtk.cc +++ b/chrome/browser/gtk/slide_animator_gtk.cc @@ -26,6 +26,8 @@ void OnSizeAllocate(GtkWidget* fixed, SlideAnimatorGtk::SlideAnimatorGtk(GtkWidget* child, Direction direction, + int duration, + bool linear, Delegate* delegate) : child_(child), direction_(direction), @@ -42,7 +44,11 @@ SlideAnimatorGtk::SlideAnimatorGtk(GtkWidget* child, G_CALLBACK(OnSizeAllocate), child_); animation_.reset(new SlideAnimation(this)); - animation_->SetTweenType(SlideAnimation::NONE); + // Default tween type is EASE_OUT. + if (linear) + animation_->SetTweenType(SlideAnimation::NONE); + if (duration != 0) + animation_->SetSlideDuration(duration); } SlideAnimatorGtk::~SlideAnimatorGtk() { |