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.
5 #include "ash/system/tray/tray_constants.h"
7 #include "ash/ash_switches.h"
8 #include "third_party/skia/include/core/SkColor.h"
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;
18 // Inset between the edge of the shelf region and the status tray.
19 const int kPaddingFromEdgeOfShelf
= 3;
21 // Top inset of system tray bubble for bottom anchor alignment.
22 const int kTrayBubbleAnchorTopInsetBottomAnchor
= 3;
24 const int kTrayImageItemHorizontalPaddingBottomAlignment
= 1;
25 const int kTrayImageItemHorizontalPaddingVerticalAlignment
= 1;
26 const int kTrayImageItemVerticalPaddingVerticalAlignment
= 1;
28 const int kTrayLabelItemHorizontalPaddingBottomAlignment
= 7;
29 const int kTrayLabelItemVerticalPaddingVeriticalAlignment
= 4;
31 const int kTrayMenuBottomRowPadding
= 5;
32 const int kTrayMenuBottomRowPaddingBetweenItems
= -1;
34 const int kTrayPopupAutoCloseDelayInSeconds
= 2;
35 const int kTrayPopupAutoCloseDelayForTextInSeconds
= 5;
36 const int kTrayPopupPaddingHorizontal
= 18;
37 const int kTrayPopupPaddingBetweenItems
= 10;
38 const int kTrayPopupTextSpacingVertical
= 4;
40 const int kTrayPopupItemHeight
= 48;
41 const int kTrayPopupDetailsIconWidth
= 25;
42 const int kTrayPopupScrollSeparatorHeight
= 15;
43 const int kTrayRoundedBorderRadius
= 2;
44 const int kTrayBarButtonWidth
= 39;
46 const SkColor kBackgroundColor
= SkColorSetRGB(0xfe, 0xfe, 0xfe);
47 const SkColor kHoverBackgroundColor
= SkColorSetRGB(0xf3, 0xf3, 0xf3);
48 const SkColor kPublicAccountBackgroundColor
= SkColorSetRGB(0xf8, 0xe5, 0xb6);
49 const SkColor kPublicAccountUserCardTextColor
= SkColorSetRGB(0x66, 0x66, 0x66);
50 const SkColor kPublicAccountUserCardNameColor
= SK_ColorBLACK
;
52 const SkColor kHeaderBackgroundColor
= SkColorSetRGB(0xf5, 0xf5, 0xf5);
54 const SkColor kBorderDarkColor
= SkColorSetRGB(0xaa, 0xaa, 0xaa);
55 const SkColor kBorderLightColor
= SkColorSetRGB(0xeb, 0xeb, 0xeb);
56 const SkColor kButtonStrokeColor
= SkColorSetRGB(0xdd, 0xdd, 0xdd);
58 const SkColor kHeaderTextColorNormal
= SkColorSetARGB(0x7f, 0, 0, 0);
59 const SkColor kHeaderTextColorHover
= SkColorSetARGB(0xd3, 0, 0, 0);
61 const int kTrayPopupMinWidth
= 300;
62 const int kTrayPopupMaxWidth
= 500;
63 const int kNotificationIconWidth
= 40;
64 const int kNotificationButtonWidth
= 32;
65 const int kTrayNotificationContentsWidth
= kTrayPopupMinWidth
-
66 (kNotificationIconWidth
+ kNotificationButtonWidth
+
67 (kTrayPopupPaddingHorizontal
/ 2) * 3);
68 const int kTraySpacing
= 8;
69 const int kAlternateTraySpacing
= 4;
71 // Returns kTraySpacing or kAlternateTraySpacing as applicable
72 // (Determined by ash::switches::UseAlternateShelfLayout).
73 int GetTraySpacing() {
74 return ash::switches::UseAlternateShelfLayout() ?
75 kAlternateTraySpacing
: kTraySpacing
;