| Index: ash/system/tray/tray_item_view.cc
|
| diff --git a/ash/system/tray/tray_item_view.cc b/ash/system/tray/tray_item_view.cc
|
| index b338358f0c9b3aaddd2995b2a2d6697a3912606b..a1a749aed7805eb5357d46b1895838ef0ac47a1f 100644
|
| --- a/ash/system/tray/tray_item_view.cc
|
| +++ b/ash/system/tray/tray_item_view.cc
|
| @@ -85,15 +85,13 @@ int TrayItemView::GetAnimationDurationMS() {
|
|
|
| gfx::Size TrayItemView::GetPreferredSize() const {
|
| gfx::Size size = DesiredSize();
|
| - if (owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_BOTTOM ||
|
| - owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_TOP)
|
| + if (owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_BOTTOM)
|
| size.set_height(kTrayIconHeight);
|
| else
|
| size.set_width(kTrayIconWidth);
|
| if (!animation_.get() || !animation_->is_animating())
|
| return size;
|
| - if (owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_BOTTOM ||
|
| - owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_TOP) {
|
| + if (owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_BOTTOM) {
|
| size.set_width(std::max(1,
|
| static_cast<int>(size.width() * animation_->GetCurrentValue())));
|
| } else {
|
| @@ -113,8 +111,7 @@ void TrayItemView::ChildPreferredSizeChanged(views::View* child) {
|
|
|
| void TrayItemView::AnimationProgressed(const gfx::Animation* animation) {
|
| gfx::Transform transform;
|
| - if (owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_BOTTOM ||
|
| - owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_TOP) {
|
| + if (owner()->system_tray()->shelf_alignment() == SHELF_ALIGNMENT_BOTTOM) {
|
| transform.Translate(0, animation->CurrentValueBetween(
|
| static_cast<double>(height()) / 2, 0.));
|
| } else {
|
|
|