Home | History | Annotate | Download | only in tray
      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 // Inset between the edge of the shelf region and the status tray.
     19 const int kPaddingFromEdgeOfShelf = 3;
     20 
     21 // Top inset of system tray bubble for bottom anchor alignment.
     22 const int kTrayBubbleAnchorTopInsetBottomAnchor = 3;
     23 
     24 const int kTrayImageItemHorizontalPaddingBottomAlignment = 1;
     25 const int kTrayImageItemHorizontalPaddingVerticalAlignment = 1;
     26 const int kTrayImageItemVerticalPaddingVerticalAlignment = 1;
     27 
     28 const int kTrayLabelItemHorizontalPaddingBottomAlignment = 7;
     29 const int kTrayLabelItemVerticalPaddingVeriticalAlignment = 4;
     30 
     31 const int kTrayMenuBottomRowPadding = 5;
     32 const int kTrayMenuBottomRowPaddingBetweenItems = -1;
     33 
     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;
     39 
     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;
     45 
     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;
     51 
     52 const SkColor kHeaderBackgroundColor = SkColorSetRGB(0xf5, 0xf5, 0xf5);
     53 
     54 const SkColor kBorderDarkColor = SkColorSetRGB(0xaa, 0xaa, 0xaa);
     55 const SkColor kBorderLightColor = SkColorSetRGB(0xeb, 0xeb, 0xeb);
     56 const SkColor kButtonStrokeColor = SkColorSetRGB(0xdd, 0xdd, 0xdd);
     57 
     58 const SkColor kHeaderTextColorNormal = SkColorSetARGB(0x7f, 0, 0, 0);
     59 const SkColor kHeaderTextColorHover = SkColorSetARGB(0xd3, 0, 0, 0);
     60 
     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;
     70 
     71 // Returns kTraySpacing or kAlternateTraySpacing as applicable
     72 // (Determined by ash::switches::UseAlternateShelfLayout).
     73 int GetTraySpacing() {
     74   return ash::switches::UseAlternateShelfLayout() ?
     75       kAlternateTraySpacing : kTraySpacing;
     76 }
     77 
     78 }  // namespace ash
     79