| 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 "ash/launcher/launcher_button.h" | 5 #include "ash/launcher/launcher_button.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "ash/launcher/launcher_button_host.h" | 10 #include "ash/launcher/launcher_button_host.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 // Size of the bar. This is along the opposite axis of the shelf. For example, | 29 // Size of the bar. This is along the opposite axis of the shelf. For example, |
| 30 // if the shelf is aligned horizontally then this is the height of the bar. | 30 // if the shelf is aligned horizontally then this is the height of the bar. |
| 31 const int kBarSize = 3; | 31 const int kBarSize = 3; |
| 32 const int kBarSpacing = 5; | 32 const int kBarSpacing = 5; |
| 33 const int kIconSize = 32; | 33 const int kIconSize = 32; |
| 34 const int kHopSpacing = 2; | 34 const int kHopSpacing = 2; |
| 35 const int kIconPad = 8; | 35 const int kIconPad = 8; |
| 36 const int kAlternateIconPad = 7; | 36 const int kAlternateIconPad = 5; |
| 37 const int kHopUpMS = 0; | 37 const int kHopUpMS = 0; |
| 38 const int kHopDownMS = 200; | 38 const int kHopDownMS = 200; |
| 39 const int kAttentionThrobDurationMS = 800; | 39 const int kAttentionThrobDurationMS = 800; |
| 40 | 40 |
| 41 bool ShouldHop(int state) { | 41 bool ShouldHop(int state) { |
| 42 return state & ash::internal::LauncherButton::STATE_HOVERED || | 42 return state & ash::internal::LauncherButton::STATE_HOVERED || |
| 43 state & ash::internal::LauncherButton::STATE_ACTIVE || | 43 state & ash::internal::LauncherButton::STATE_ACTIVE || |
| 44 state & ash::internal::LauncherButton::STATE_FOCUSED; | 44 state & ash::internal::LauncherButton::STATE_FOCUSED; |
| 45 } | 45 } |
| 46 | 46 |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 shelf_layout_manager_->PrimaryAxisValue(views::ImageView::CENTER, | 556 shelf_layout_manager_->PrimaryAxisValue(views::ImageView::CENTER, |
| 557 views::ImageView::LEADING)); | 557 views::ImageView::LEADING)); |
| 558 icon_view_->SetVerticalAlignment( | 558 icon_view_->SetVerticalAlignment( |
| 559 shelf_layout_manager_->PrimaryAxisValue(views::ImageView::LEADING, | 559 shelf_layout_manager_->PrimaryAxisValue(views::ImageView::LEADING, |
| 560 views::ImageView::CENTER)); | 560 views::ImageView::CENTER)); |
| 561 SchedulePaint(); | 561 SchedulePaint(); |
| 562 } | 562 } |
| 563 | 563 |
| 564 } // namespace internal | 564 } // namespace internal |
| 565 } // namespace ash | 565 } // namespace ash |
| OLD | NEW |