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