Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: ash/launcher/launcher_button.cc

Issue 22291003: ash:Shelf Update Alternate Layout (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nl Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/launcher/alternate_app_list_button.cc ('k') | ash/launcher/launcher_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/launcher/alternate_app_list_button.cc ('k') | ash/launcher/launcher_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698