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/system/tray/tray_constants.h" | 5 #include "ash/system/tray/tray_constants.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "third_party/skia/include/core/SkColor.h" | 8 #include "third_party/skia/include/core/SkColor.h" |
9 | 9 |
10 namespace ash { | 10 namespace ash { |
11 | 11 |
12 const int kPaddingFromRightEdgeOfScreenBottomAlignment = 7; | 12 const int kPaddingFromRightEdgeOfScreenBottomAlignment = 7; |
13 const int kPaddingFromBottomOfScreenBottomAlignment = 7; | 13 const int kPaddingFromBottomOfScreenBottomAlignment = 7; |
14 const int kPaddingFromOuterEdgeOfLauncherVerticalAlignment = 8; | 14 const int kPaddingFromOuterEdgeOfLauncherVerticalAlignment = 8; |
15 const int kPaddingFromInnerEdgeOfLauncherVerticalAlignment = 9; | 15 const int kPaddingFromInnerEdgeOfLauncherVerticalAlignment = 9; |
16 const int kPaddingFromBottomOfScreenVerticalAlignment = 10; | 16 const int kPaddingFromBottomOfScreenVerticalAlignment = 10; |
17 | 17 |
18 // Padding used to position the system menu relative to the status area. | 18 // Padding used to position the system menu relative to the status area. |
19 const int kAlternateLayoutBubblePaddingHorizontalBottom = 6; | 19 const int kBubblePaddingHorizontalBottom = 6; |
20 const int kAlternateLayoutBubblePaddingHorizontalSide = 10; | 20 const int kBubblePaddingHorizontalSide = 10; |
21 const int kAlternateLayoutBubblePaddingVerticalBottom = 3; | 21 const int kBubblePaddingVerticalBottom = 3; |
22 const int kAlternateLayoutBubblePaddingVerticalSide = 15; | 22 const int kBubblePaddingVerticalSide = 15; |
23 | 23 |
24 const int kPaddingFromEdgeOfShelf = 3; | 24 const int kPaddingFromEdgeOfShelf = 3; |
25 | 25 |
26 // Top inset of system tray bubble for bottom anchor alignment. | 26 // Top inset of system tray bubble for bottom anchor alignment. |
27 const int kTrayBubbleAnchorTopInsetBottomAnchor = 3; | 27 const int kTrayBubbleAnchorTopInsetBottomAnchor = 3; |
28 | 28 |
29 const int kTrayImageItemHorizontalPaddingBottomAlignment = 1; | 29 const int kTrayImageItemHorizontalPaddingBottomAlignment = 1; |
30 const int kTrayImageItemHorizontalPaddingVerticalAlignment = 1; | 30 const int kTrayImageItemHorizontalPaddingVerticalAlignment = 1; |
31 const int kTrayImageItemVerticalPaddingVerticalAlignment = 1; | 31 const int kTrayImageItemVerticalPaddingVerticalAlignment = 1; |
32 | 32 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
66 const SkColor kHeaderTextColorNormal = SkColorSetARGB(0x7f, 0, 0, 0); | 66 const SkColor kHeaderTextColorNormal = SkColorSetARGB(0x7f, 0, 0, 0); |
67 const SkColor kHeaderTextColorHover = SkColorSetARGB(0xd3, 0, 0, 0); | 67 const SkColor kHeaderTextColorHover = SkColorSetARGB(0xd3, 0, 0, 0); |
68 | 68 |
69 const int kTrayPopupMinWidth = 300; | 69 const int kTrayPopupMinWidth = 300; |
70 const int kTrayPopupMaxWidth = 500; | 70 const int kTrayPopupMaxWidth = 500; |
71 const int kNotificationIconWidth = 40; | 71 const int kNotificationIconWidth = 40; |
72 const int kNotificationButtonWidth = 32; | 72 const int kNotificationButtonWidth = 32; |
73 const int kTrayNotificationContentsWidth = kTrayPopupMinWidth - | 73 const int kTrayNotificationContentsWidth = kTrayPopupMinWidth - |
74 (kNotificationIconWidth + kNotificationButtonWidth + | 74 (kNotificationIconWidth + kNotificationButtonWidth + |
75 (kTrayPopupPaddingHorizontal / 2) * 3); | 75 (kTrayPopupPaddingHorizontal / 2) * 3); |
76 const int kTraySpacing = 8; | 76 const int kTraySpacing = 4; |
77 const int kAlternateTraySpacing = 4; | 77 const int kShelfItemHeight = 38; |
78 const int kShelfItemHeight = 31; | |
79 const int kAlternateShelfItemHeight = 38; | |
80 | 78 |
81 int GetTraySpacing() { | 79 int GetTraySpacing() { |
James Cook
2014/01/23 18:02:35
Maybe not for this CL, but references to this func
Harry McCleave
2014/01/24 22:48:47
ShelfItemHeight as well, will do in part 2.
| |
82 return ash::switches::UseAlternateShelfLayout() ? | 80 return kTraySpacing; |
83 kAlternateTraySpacing : kTraySpacing; | |
84 } | 81 } |
85 | 82 |
86 int GetShelfItemHeight() { | 83 int GetShelfItemHeight() { |
87 return ash::switches::UseAlternateShelfLayout() ? | 84 return kShelfItemHeight; |
88 kAlternateShelfItemHeight : kShelfItemHeight; | |
89 } | 85 } |
90 | 86 |
91 } // namespace ash | 87 } // namespace ash |
OLD | NEW |