| 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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 slide_animation_.Show(); | 600 slide_animation_.Show(); |
| 601 } | 601 } |
| 602 | 602 |
| 603 void IssueAdviceView::AnimationProgressed(const ui::Animation* animation) { | 603 void IssueAdviceView::AnimationProgressed(const ui::Animation* animation) { |
| 604 DCHECK_EQ(animation, &slide_animation_); | 604 DCHECK_EQ(animation, &slide_animation_); |
| 605 | 605 |
| 606 if (details_view_) | 606 if (details_view_) |
| 607 details_view_->AnimateToState(animation->GetCurrentValue()); | 607 details_view_->AnimateToState(animation->GetCurrentValue()); |
| 608 | 608 |
| 609 if (arrow_view_) { | 609 if (arrow_view_) { |
| 610 ui::Transform rotate; | 610 gfx::Transform rotate; |
| 611 if (animation->GetCurrentValue() != 0.0) { | 611 if (animation->GetCurrentValue() != 0.0) { |
| 612 rotate.SetTranslate(-arrow_view_->width() / 2.0, | 612 rotate.SetTranslate(-arrow_view_->width() / 2.0, |
| 613 -arrow_view_->height() / 2.0); | 613 -arrow_view_->height() / 2.0); |
| 614 // TODO(estade): for some reason there are rendering errors at 90 degrees. | 614 // TODO(estade): for some reason there are rendering errors at 90 degrees. |
| 615 // Figure out why. | 615 // Figure out why. |
| 616 rotate.ConcatRotate(animation->GetCurrentValue() * 89); | 616 rotate.ConcatRotate(animation->GetCurrentValue() * 89); |
| 617 rotate.ConcatTranslate(arrow_view_->width() / 2.0, | 617 rotate.ConcatTranslate(arrow_view_->width() / 2.0, |
| 618 arrow_view_->height() / 2.0); | 618 arrow_view_->height() / 2.0); |
| 619 } | 619 } |
| 620 arrow_view_->SetTransform(rotate); | 620 arrow_view_->SetTransform(rotate); |
| 621 } | 621 } |
| 622 } | 622 } |
| 623 | 623 |
| 624 void IssueAdviceView::ChildPreferredSizeChanged(views::View* child) { | 624 void IssueAdviceView::ChildPreferredSizeChanged(views::View* child) { |
| 625 owner_->SizeToContents(); | 625 owner_->SizeToContents(); |
| 626 } | 626 } |
| OLD | NEW |