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
3 // found in the LICENSE file.
4
5 #include "ash/system/tray/tray_constants.h"
6
7 #include "ash/ash_switches.h"
8 #include "third_party/skia/include/core/SkColor.h"
9
10 namespace ash {
11
12 const int kPaddingFromRightEdgeOfScreenBottomAlignment = 7;
13 const int kPaddingFromBottomOfScreenBottomAlignment = 7;
14 const int kPaddingFromOuterEdgeOfLauncherVerticalAlignment = 8;
15 const int kPaddingFromInnerEdgeOfLauncherVerticalAlignment = 9;
16 const int kPaddingFromBottomOfScreenVerticalAlignment = 10;
17
18 // Padding used to position the system menu relative to the status area.
19 const int kAlternateLayoutBubblePaddingHorizontalBottom = 6;
20 const int kAlternateLayoutBubblePaddingHorizontalSide = 10;
21 const int kAlternateLayoutBubblePaddingVerticalBottom = 3;
22 const int kAlternateLayoutBubblePaddingVerticalSide = 15;
23
24 const int kPaddingFromEdgeOfShelf = 3;
25
26 // Top inset of system tray bubble for bottom anchor alignment.
27 const int kTrayBubbleAnchorTopInsetBottomAnchor = 3;
28
29 const int kTrayImageItemHorizontalPaddingBottomAlignment = 1;
30 const int kTrayImageItemHorizontalPaddingVerticalAlignment = 1;
31 const int kTrayImageItemVerticalPaddingVerticalAlignment = 1;
32
33 const int kTrayLabelItemHorizontalPaddingBottomAlignment = 7;
34
35 // Vertical padding between status tray items when the shelf is vertical.
36 const int kTrayLabelItemVerticalPaddingVerticalAlignment = 4;
37
38 const int kTrayMenuBottomRowPadding = 5;
39 const int kTrayMenuBottomRowPaddingBetweenItems = -1;
40
41 const int kTrayPopupAutoCloseDelayInSeconds = 2;
42 const int kTrayPopupAutoCloseDelayForTextInSeconds = 5;
43 const int kTrayPopupPaddingHorizontal = 18;
44 const int kTrayPopupPaddingBetweenItems = 10;
45 const int kTrayPopupTextSpacingVertical = 4;
46
47 const int kTrayPopupItemHeight = 48;
48 const int kTrayPopupDetailsIconWidth = 25;
49 const int kTrayPopupDetailsLabelExtraLeftMargin = 8;
50 const int kTrayPopupScrollSeparatorHeight = 15;
51 const int kTrayRoundedBorderRadius = 2;
52 const int kTrayBarButtonWidth = 39;
53
54 const SkColor kBackgroundColor = SkColorSetRGB(0xfe, 0xfe, 0xfe);
55 const SkColor kHoverBackgroundColor = SkColorSetRGB(0xf3, 0xf3, 0xf3);
56 const SkColor kPublicAccountBackgroundColor = SkColorSetRGB(0xf8, 0xe5, 0xb6);
57 const SkColor kPublicAccountUserCardTextColor = SkColorSetRGB(0x66, 0x66, 0x66);
58 const SkColor kPublicAccountUserCardNameColor = SK_ColorBLACK;
59
60 const SkColor kHeaderBackgroundColor = SkColorSetRGB(0xf5, 0xf5, 0xf5);
61
62 const SkColor kBorderDarkColor = SkColorSetRGB(0xaa, 0xaa, 0xaa);
63 const SkColor kBorderLightColor = SkColorSetRGB(0xeb, 0xeb, 0xeb);
64 const SkColor kButtonStrokeColor = SkColorSetRGB(0xdd, 0xdd, 0xdd);
65
66 const SkColor kHeaderTextColorNormal = SkColorSetARGB(0x7f, 0, 0, 0);
67 const SkColor kHeaderTextColorHover = SkColorSetARGB(0xd3, 0, 0, 0);
68
69 const int kTrayPopupMinWidth = 300;
70 const int kTrayPopupMaxWidth = 500;
71 const int kNotificationIconWidth = 40;
72 const int kNotificationButtonWidth = 32;
73 const int kTrayNotificationContentsWidth = kTrayPopupMinWidth -
74 (kNotificationIconWidth + kNotificationButtonWidth +
75 (kTrayPopupPaddingHorizontal / 2) * 3);
76 const int kTraySpacing = 8;
77 const int kAlternateTraySpacing = 4;
78 const int kShelfItemHeight = 31;
79 const int kAlternateShelfItemHeight = 38;
80
GetTraySpacing()81 int GetTraySpacing() {
82 return ash::switches::UseAlternateShelfLayout() ?
83 kAlternateTraySpacing : kTraySpacing;
84 }
85
GetShelfItemHeight()86 int GetShelfItemHeight() {
87 return ash::switches::UseAlternateShelfLayout() ?
88 kAlternateShelfItemHeight : kShelfItemHeight;
89 }
90
91 } // namespace ash
92