From b9b1e7a4fa49c108c40536cee59ce0b2b0a09d86 Mon Sep 17 00:00:00 2001 From: "sky@chromium.org" Date: Tue, 17 May 2011 15:29:51 +0000 Subject: Makes Transform concrete. Fixes bug in coordinate conversion and makes all conversion routines calculate the transform in the same way. Lastly fixes bug in touch_factory.cc that was causing crashes on my machine when running views_unittests. Oh, and adds some tests of conversion methods. BUG=none TEST=none R=ben@chromium.org,sadrul@chromium.org Review URL: http://codereview.chromium.org/7033002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85635 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/ui/touch/frame/touch_browser_frame_view.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'chrome') diff --git a/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc b/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc index 946b7ca..f685e37 100644 --- a/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc +++ b/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc @@ -20,6 +20,7 @@ #include "content/common/notification_type.h" #include "ui/base/animation/slide_animation.h" #include "ui/gfx/rect.h" +#include "ui/gfx/transform.h" #include "views/controls/button/image_button.h" #include "views/controls/textfield/textfield.h" #include "views/focus/focus_manager.h" @@ -278,8 +279,10 @@ void TouchBrowserFrameView::Observe(NotificationType type, /////////////////////////////////////////////////////////////////////////////// // ui::AnimationDelegate implementation void TouchBrowserFrameView::AnimationProgressed(const ui::Animation* anim) { - keyboard_->SetTranslateY( + ui::Transform transform; + transform.SetTranslateY( ui::Tween::ValueBetween(anim->GetCurrentValue(), kKeyboardHeight, 0)); + keyboard_->SetTransform(transform); browser_view()->set_clip_y( ui::Tween::ValueBetween(anim->GetCurrentValue(), 0, kKeyboardHeight)); SchedulePaint(); -- cgit v1.1