Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(611)

Side by Side Diff: ash/common/system/tray/tray_constants.cc

Issue 2454393002: Enable Ash material design shelf and system menu by default (Closed)
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/common/shelf/shelf_constants.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/common/system/tray/tray_constants.h" 5 #include "ash/common/system/tray/tray_constants.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "third_party/skia/include/core/SkColor.h" 9 #include "third_party/skia/include/core/SkColor.h"
10 #include "ui/gfx/color_palette.h" 10 #include "ui/gfx/color_palette.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 const SkColor kHorizontalSeparatorColor = SkColorSetA(SK_ColorBLACK, 0x1F); 92 const SkColor kHorizontalSeparatorColor = SkColorSetA(SK_ColorBLACK, 0x1F);
93 const int kHorizontalSeparatorHeight = 24; 93 const int kHorizontalSeparatorHeight = 24;
94 94
95 const SkColor kTrayPopupInkDropBaseColor = SK_ColorBLACK; 95 const SkColor kTrayPopupInkDropBaseColor = SK_ColorBLACK;
96 const float kTrayPopupInkDropRippleOpacity = 0.06f; 96 const float kTrayPopupInkDropRippleOpacity = 0.06f;
97 const float kTrayPopupInkDropHighlightOpacity = 0.08f; 97 const float kTrayPopupInkDropHighlightOpacity = 0.08f;
98 const int kTrayPopupInkDropInset = 4; 98 const int kTrayPopupInkDropInset = 4;
99 99
100 int GetTrayConstant(TrayConstant constant) { 100 int GetTrayConstant(TrayConstant constant) {
101 const int kTrayItemHeightLegacy[] = {38, 38, kTrayItemSize}; 101 const int kTrayItemHeightLegacy[] = {38, kTrayItemSize, kTrayItemSize};
102 const int kTraySpacing[] = {4, 4, 0}; 102 const int kTraySpacing[] = {4, 0, 0};
103 const int kTrayPaddingFromEdgeOfShelf[] = {3, 3, 4}; 103 const int kTrayPaddingFromEdgeOfShelf[] = {3, 4, 4};
104 const int kTrayPopupItemHeight[] = {46, 46, 48}; 104 const int kTrayPopupItemHeight[] = {46, 48, 48};
105 // TODO(bruthig): Use the correct values for non-material design. 105 // TODO(bruthig): Use the correct values for non-material design.
106 const int kTrayPopupItemLeftInset[] = {0, 0, 4}; 106 const int kTrayPopupItemLeftInset[] = {0, 4, 4};
107 // TODO(bruthig): Use the correct values for non-material design. 107 // TODO(bruthig): Use the correct values for non-material design.
108 const int kTrayPopupItemRightInset[] = {0, 0, 4}; 108 const int kTrayPopupItemRightInset[] = {0, 4, 4};
109 // TODO(bruthig): Use the correct values for non-material design. 109 // TODO(bruthig): Use the correct values for non-material design.
110 const int kTrayPopupItemMinStartWidth[] = {48, 48, 48}; 110 const int kTrayPopupItemMinStartWidth[] = {48, 48, 48};
111 // TODO(bruthig): Use the correct values for non-material design. 111 // TODO(bruthig): Use the correct values for non-material design.
112 const int kTrayPopupItemMinEndWidth[] = {48, 48, 48}; 112 const int kTrayPopupItemMinEndWidth[] = {48, 48, 48};
113 const int kVirtualKeyboardButtonSize[] = {39, 39, kTrayItemSize}; 113 const int kVirtualKeyboardButtonSize[] = {39, kTrayItemSize, kTrayItemSize};
114 const int kTrayImeMenuIcon[] = {40, 40, kTrayItemSize}; 114 const int kTrayImeMenuIcon[] = {40, kTrayItemSize, kTrayItemSize};
115 const int kTrayImageItemPadding[] = {1, 1, 3}; 115 const int kTrayImageItemPadding[] = {1, 3, 3};
116 116
117 const int mode = MaterialDesignController::GetMode(); 117 const int mode = MaterialDesignController::GetMode();
118 DCHECK(mode >= MaterialDesignController::NON_MATERIAL && 118 DCHECK(mode >= MaterialDesignController::NON_MATERIAL &&
119 mode <= MaterialDesignController::MATERIAL_EXPERIMENTAL); 119 mode <= MaterialDesignController::MATERIAL_EXPERIMENTAL);
120 120
121 switch (constant) { 121 switch (constant) {
122 case TRAY_ITEM_HEIGHT_LEGACY: 122 case TRAY_ITEM_HEIGHT_LEGACY:
123 return kTrayItemHeightLegacy[mode]; 123 return kTrayItemHeightLegacy[mode];
124 case TRAY_SPACING: 124 case TRAY_SPACING:
125 return kTraySpacing[mode]; 125 return kTraySpacing[mode];
(...skipping 14 matching lines...) Expand all
140 case TRAY_IME_MENU_ICON: 140 case TRAY_IME_MENU_ICON:
141 return kTrayImeMenuIcon[mode]; 141 return kTrayImeMenuIcon[mode];
142 case TRAY_IMAGE_ITEM_PADDING: 142 case TRAY_IMAGE_ITEM_PADDING:
143 return kTrayImageItemPadding[mode]; 143 return kTrayImageItemPadding[mode];
144 } 144 }
145 NOTREACHED(); 145 NOTREACHED();
146 return 0; 146 return 0;
147 } 147 }
148 148
149 } // namespace ash 149 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/shelf/shelf_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698