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

Unified Diff: ui/views/controls/slide_out_view.cc

Issue 11418040: gfx::Transform API clean-up (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | « ui/gfx/transform_util.cc ('k') | ui/views/corewm/image_grid.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/slide_out_view.cc
diff --git a/ui/views/controls/slide_out_view.cc b/ui/views/controls/slide_out_view.cc
index e3d7425870e70f9de2358d3f37a5d24f56dd9fb2..058421d614cc12a41bfbe81fc0e8c72f9d01343e 100644
--- a/ui/views/controls/slide_out_view.cc
+++ b/ui/views/controls/slide_out_view.cc
@@ -43,7 +43,7 @@ ui::EventResult SlideOutView::OnGestureEvent(ui::GestureEvent* event) {
gesture_scroll_amount_ += event->details().scroll_x();
gfx::Transform transform;
- transform.SetTranslateX(gesture_scroll_amount_);
+ transform.Translate(gesture_scroll_amount_, 0.0);
layer()->SetTransform(transform);
layer()->SetOpacity(
1.f - std::min(fabsf(gesture_scroll_amount_) / width(), 1.f));
@@ -79,7 +79,7 @@ void SlideOutView::SlideOutAndClose(SlideDirection direction) {
settings.AddObserver(this);
gfx::Transform transform;
- transform.SetTranslateX(direction == SLIDE_LEFT ? -width() : width());
+ transform.Translate(direction == SLIDE_LEFT ? -width() : width(), 0.0);
layer()->SetTransform(transform);
layer()->SetOpacity(0.f);
}
« no previous file with comments | « ui/gfx/transform_util.cc ('k') | ui/views/corewm/image_grid.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698