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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 const int kTrayPopupMinWidth = 300; | 73 const int kTrayPopupMinWidth = 300; |
74 const int kTrayPopupMaxWidth = 500; | 74 const int kTrayPopupMaxWidth = 500; |
75 const int kNotificationIconWidth = 40; | 75 const int kNotificationIconWidth = 40; |
76 const int kNotificationButtonWidth = 32; | 76 const int kNotificationButtonWidth = 32; |
77 const int kTrayNotificationContentsWidth = kTrayPopupMinWidth - | 77 const int kTrayNotificationContentsWidth = kTrayPopupMinWidth - |
78 (kNotificationIconWidth + kNotificationButtonWidth + | 78 (kNotificationIconWidth + kNotificationButtonWidth + |
79 (kTrayPopupPaddingHorizontal / 2) * 3); | 79 (kTrayPopupPaddingHorizontal / 2) * 3); |
80 | 80 |
81 const int kTrayAvatarCornerRadius = 2; | 81 const int kTrayAvatarCornerRadius = 2; |
82 const int kTrayAvatarSize = 27; | 82 const int kTrayAvatarSize = 32; |
83 | 83 |
84 const int kTraySpacing = 8; | 84 const int kTraySpacing = 4; |
85 const int kAlternateTraySpacing = 4; | 85 const int kShelfItemHeight = 38; |
86 const int kShelfItemHeight = 31; | |
87 const int kAlternateShelfItemHeight = 38; | |
88 | |
89 int GetTraySpacing() { | |
90 return ash::switches::UseAlternateShelfLayout() ? | |
91 kAlternateTraySpacing : kTraySpacing; | |
92 } | |
93 | |
94 int GetShelfItemHeight() { | |
95 return ash::switches::UseAlternateShelfLayout() ? | |
96 kAlternateShelfItemHeight : kShelfItemHeight; | |
97 } | |
98 | 86 |
99 } // namespace ash | 87 } // namespace ash |
OLD | NEW |