| OLD | NEW |
| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 | 615 |
| 616 void IssueAdviceView::AnimationProgressed(const ui::Animation* animation) { | 616 void IssueAdviceView::AnimationProgressed(const ui::Animation* animation) { |
| 617 DCHECK_EQ(animation, &slide_animation_); | 617 DCHECK_EQ(animation, &slide_animation_); |
| 618 | 618 |
| 619 if (details_view_) | 619 if (details_view_) |
| 620 details_view_->AnimateToState(animation->GetCurrentValue()); | 620 details_view_->AnimateToState(animation->GetCurrentValue()); |
| 621 | 621 |
| 622 if (arrow_view_) { | 622 if (arrow_view_) { |
| 623 gfx::Transform rotate; | 623 gfx::Transform rotate; |
| 624 if (animation->GetCurrentValue() != 0.0) { | 624 if (animation->GetCurrentValue() != 0.0) { |
| 625 rotate.SetTranslate(-arrow_view_->width() / 2.0, | 625 rotate.Translate(arrow_view_->width() / 2.0, |
| 626 -arrow_view_->height() / 2.0); | 626 arrow_view_->height() / 2.0); |
| 627 // TODO(estade): for some reason there are rendering errors at 90 degrees. | 627 // TODO(estade): for some reason there are rendering errors at 90 degrees. |
| 628 // Figure out why. | 628 // Figure out why. |
| 629 rotate.ConcatRotate(animation->GetCurrentValue() * 89); | 629 rotate.Rotate(animation->GetCurrentValue() * 89); |
| 630 rotate.ConcatTranslate(arrow_view_->width() / 2.0, | 630 rotate.Translate(-arrow_view_->width() / 2.0, |
| 631 arrow_view_->height() / 2.0); | 631 -arrow_view_->height() / 2.0); |
| 632 } | 632 } |
| 633 arrow_view_->SetTransform(rotate); | 633 arrow_view_->SetTransform(rotate); |
| 634 } | 634 } |
| 635 } | 635 } |
| 636 | 636 |
| 637 void IssueAdviceView::ChildPreferredSizeChanged(views::View* child) { | 637 void IssueAdviceView::ChildPreferredSizeChanged(views::View* child) { |
| 638 owner_->SizeToContents(); | 638 owner_->SizeToContents(); |
| 639 } | 639 } |
| OLD | NEW |