tray_constants.cc 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. #include "ash/system/tray/tray_constants.h"
  5. namespace ash {
  6. const int kTrayTextFontSizeIncrease = 2;
  7. // Size of tray items on the primary axis.
  8. const int kTrayItemSize = 32;
  9. const float kTrayItemCornerRadius = kTrayItemSize / 2.f;
  10. const int kTrayPopupAutoCloseDelayInSeconds = 2;
  11. const int kTrayPopupAutoCloseDelayInSecondsWithSpokenFeedback = 5;
  12. const int kTrayPopupPaddingHorizontal = 18;
  13. const int kTrayPopupButtonEndMargin = 10;
  14. const int kTrayPopupLabelHorizontalPadding = 4;
  15. const int kTrayPopupSliderHorizontalPadding = 16;
  16. const int kTrayPopupItemMinHeight = 48;
  17. const int kTrayPopupItemMinStartWidth = 48;
  18. const int kTrayPopupItemMinEndWidth =
  19. kMenuIconSize + 2 * kTrayPopupButtonEndMargin;
  20. const int kTrayPopupLabelRightPadding = 8;
  21. const int kTrayToggleButtonWidth = 68;
  22. const int kMenuIconSize = 20;
  23. const int kMenuButtonSize = 48;
  24. const int kMenuSeparatorVerticalPadding = 4;
  25. const int kMenuExtraMarginFromLeftEdge = 4;
  26. const int kMenuEdgeEffectivePadding =
  27. kMenuExtraMarginFromLeftEdge + (kMenuButtonSize - kMenuIconSize) / 2;
  28. const int kTrayPopupInkDropInset = 4;
  29. const int kTrayPopupInkDropCornerRadius = 2;
  30. static_assert(kTrayMenuWidth == kUnifiedFeaturePodHorizontalSidePadding * 2 +
  31. kUnifiedFeaturePodHorizontalMiddlePadding *
  32. (kUnifiedFeaturePodItemsInRow - 1) +
  33. kUnifiedFeaturePodSize.width() *
  34. kUnifiedFeaturePodItemsInRow,
  35. "Total feature pod width does not match kTrayMenuWidth");
  36. } // namespace ash