| 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 11 matching lines...) Expand all Loading... |
| 22 #include "ui/gfx/image/image.h" | 22 #include "ui/gfx/image/image.h" |
| 23 #include "ui/gfx/image/image_skia_operations.h" | 23 #include "ui/gfx/image/image_skia_operations.h" |
| 24 #include "ui/gfx/skbitmap_operations.h" | 24 #include "ui/gfx/skbitmap_operations.h" |
| 25 #include "ui/views/controls/image_view.h" | 25 #include "ui/views/controls/image_view.h" |
| 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; | |
| 33 const int kIconSize = 32; | 32 const int kIconSize = 32; |
| 34 const int kHopSpacing = 2; | 33 const int kHopSpacing = 2; |
| 35 const int kIconPad = 8; | 34 const int kIconPad = 8; |
| 36 const int kAlternateIconPad = 5; | 35 const int kAlternateIconPad = 5; |
| 37 const int kAlternateIconPadVertical = 6; | 36 const int kAlternateIconPadVertical = 6; |
| 38 const int kHopUpMS = 0; | 37 const int kHopUpMS = 0; |
| 39 const int kHopDownMS = 200; | 38 const int kHopDownMS = 200; |
| 40 const int kAttentionThrobDurationMS = 800; | 39 const int kAttentionThrobDurationMS = 800; |
| 41 | 40 |
| 42 bool ShouldHop(int state) { | 41 bool ShouldHop(int state) { |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 views::ImageView::CENTER, | 577 views::ImageView::CENTER, |
| 579 views::ImageView::LEADING)); | 578 views::ImageView::LEADING)); |
| 580 bar_->SchedulePaint(); | 579 bar_->SchedulePaint(); |
| 581 } | 580 } |
| 582 | 581 |
| 583 bar_->SetVisible(bar_id != 0 && state_ != STATE_NORMAL); | 582 bar_->SetVisible(bar_id != 0 && state_ != STATE_NORMAL); |
| 584 } | 583 } |
| 585 | 584 |
| 586 } // namespace internal | 585 } // namespace internal |
| 587 } // namespace ash | 586 } // namespace ash |
| OLD | NEW |