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

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

Issue 2709903004: Consolidate some more ash tray constants. (Closed)
Patch Set: rebase Created 3 years, 9 months 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
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 #ifndef ASH_COMMON_SYSTEM_TRAY_TRAY_CONSTANTS_H_ 5 #ifndef ASH_COMMON_SYSTEM_TRAY_TRAY_CONSTANTS_H_
6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_CONSTANTS_H_ 6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_CONSTANTS_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 9
10 typedef unsigned int SkColor; 10 typedef unsigned int SkColor;
(...skipping 10 matching lines...) Expand all
21 extern const int kBubblePaddingHorizontalSide; 21 extern const int kBubblePaddingHorizontalSide;
22 extern const int kBubblePaddingVerticalBottom; 22 extern const int kBubblePaddingVerticalBottom;
23 extern const int kBubblePaddingVerticalSide; 23 extern const int kBubblePaddingVerticalSide;
24 24
25 extern const int kTrayBubbleAnchorTopInsetBottomAnchor; 25 extern const int kTrayBubbleAnchorTopInsetBottomAnchor;
26 26
27 extern const int kTrayImageItemHorizontalPaddingVerticalAlignment; 27 extern const int kTrayImageItemHorizontalPaddingVerticalAlignment;
28 28
29 ASH_EXPORT extern const int kTrayItemSize; 29 ASH_EXPORT extern const int kTrayItemSize;
30 30
31 // Extra padding used beside a single icon in the tray area of the shelf.
32 extern const int kTrayImageItemPadding;
33
31 extern const int kTrayLabelItemHorizontalPaddingBottomAlignment; 34 extern const int kTrayLabelItemHorizontalPaddingBottomAlignment;
32 extern const int kTrayLabelItemVerticalPaddingVerticalAlignment; 35 extern const int kTrayLabelItemVerticalPaddingVerticalAlignment;
33 36
34 extern const int kTrayMenuBottomRowPadding; 37 extern const int kTrayMenuBottomRowPadding;
35 extern const int kTrayMenuBottomRowPaddingBetweenItems; 38 extern const int kTrayMenuBottomRowPaddingBetweenItems;
36 39
37 // The minimum width of the tray menu. 40 // The minimum width of the tray menu.
38 extern const int kTrayMenuMinimumWidth; 41 extern const int kTrayMenuMinimumWidth;
39 extern const int kTrayMenuMinimumWidthMd; 42 extern const int kTrayMenuMinimumWidthMd;
40 43
41 extern const int kTrayPopupAutoCloseDelayInSeconds; 44 extern const int kTrayPopupAutoCloseDelayInSeconds;
42 extern const int kTrayPopupAutoCloseDelayForTextInSeconds; 45 extern const int kTrayPopupAutoCloseDelayForTextInSeconds;
43 extern const int kTrayPopupPaddingHorizontal; 46 extern const int kTrayPopupPaddingHorizontal;
44 extern const int kTrayPopupPaddingBetweenItems; 47 extern const int kTrayPopupPaddingBetweenItems;
45 // Used for buttons that have borders. 48 // Used for buttons that have borders.
46 extern const int kTrayPopupButtonEndMargin; 49 extern const int kTrayPopupButtonEndMargin;
47 // The padding used on the left and right of labels. This applies to all labels 50 // The padding used on the left and right of labels. This applies to all labels
48 // in the system menu. 51 // in the system menu.
49 extern const int kTrayPopupLabelHorizontalPadding; 52 extern const int kTrayPopupLabelHorizontalPadding;
50 53
54 // The minimum/default height of the rows in the system tray menu.
55 extern const int kTrayPopupItemMinHeight;
56
57 // The width used for the first region of the row (which holds an image).
58 extern const int kTrayPopupItemMinStartWidth;
59
60 // The width used for the first region of the row (usually a more arrow).
tdanderson 2017/02/28 17:08:18 nit: end region
Evan Stade 2017/03/01 04:28:54 Done.
61 extern const int kTrayPopupItemMinEndWidth;
62
51 // When transitioning between a detailed and a default view, this delay is used 63 // When transitioning between a detailed and a default view, this delay is used
52 // before the transition starts. 64 // before the transition starts.
53 ASH_EXPORT extern const int kTrayDetailedViewTransitionDelayMs; 65 ASH_EXPORT extern const int kTrayDetailedViewTransitionDelayMs;
54 66
55 // Padding used on right side of labels to keep minimum distance to the next 67 // Padding used on right side of labels to keep minimum distance to the next
56 // item. This applies to all labels in the system menu. 68 // item. This applies to all labels in the system menu.
57 extern const int kTrayPopupLabelRightPadding; 69 extern const int kTrayPopupLabelRightPadding;
58 70
59 extern const int kTrayPopupDetailsIconWidth; 71 extern const int kTrayPopupDetailsIconWidth;
60 extern const int kTrayPopupDetailsLabelExtraLeftMargin; 72 extern const int kTrayPopupDetailsLabelExtraLeftMargin;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // The inset applied to clickable surfaces in the system menu that do not have 143 // The inset applied to clickable surfaces in the system menu that do not have
132 // the ink drop filling the entire bounds. 144 // the ink drop filling the entire bounds.
133 extern const int kTrayPopupInkDropInset; 145 extern const int kTrayPopupInkDropInset;
134 146
135 // The radius used to draw the corners of the rounded rect style ink drops. 147 // The radius used to draw the corners of the rounded rect style ink drops.
136 extern const int kTrayPopupInkDropCornerRadius; 148 extern const int kTrayPopupInkDropCornerRadius;
137 149
138 // The height of the system info row. 150 // The height of the system info row.
139 extern const int kTrayPopupSystemInfoRowHeight; 151 extern const int kTrayPopupSystemInfoRowHeight;
140 152
141 enum TrayConstant {
142 // A legacy height value used in non-MD calculations for applying additional
143 // borders on tray items.
144 TRAY_ITEM_HEIGHT_LEGACY,
145
146 // Padding between the edge of shelf and the item in status tray area.
147 TRAY_PADDING_FROM_EDGE_OF_SHELF,
148
149 // The minimum height of the rows in the system tray menu.
150 TRAY_POPUP_ITEM_MIN_HEIGHT,
151
152 // The maximum height of the rows in the system tray menu.
153 TRAY_POPUP_ITEM_MAX_HEIGHT,
154
155 // The width used for the main image of the row. This applies to all rows
156 // in the system menu that have a main image (e.g. default and detailed).
157 TRAY_POPUP_ITEM_MAIN_IMAGE_CONTAINER_WIDTH,
158
159 // The width used for the images used in the 'more' region of default rows.
160 TRAY_POPUP_ITEM_MORE_IMAGE_SIZE,
161
162 // The horizontal inset in the 'more' region of default rows.
163 TRAY_POPUP_ITEM_MORE_REGION_HORIZONTAL_INSET,
164
165 // The left inset for all tray system menu rows.
166 TRAY_POPUP_ITEM_LEFT_INSET,
167
168 // The minimum default width for the left container of the system menu rows.
169 TRAY_POPUP_ITEM_MIN_START_WIDTH,
170
171 // The minimum default width for the right container of the system menu rows.
172 TRAY_POPUP_ITEM_MIN_END_WIDTH,
173
174 // The icon size of opt-in IME menu tray.
175 TRAY_IME_MENU_ICON,
176
177 // Extra padding used beside a single icon in the tray area of the shelf.
178 TRAY_IMAGE_ITEM_PADDING,
179 };
180
181 ASH_EXPORT int GetTrayConstant(TrayConstant constant);
182
183 namespace test { 153 namespace test {
184 const int kSettingsTrayItemViewId = 10000; 154 const int kSettingsTrayItemViewId = 10000;
185 const int kAccessibilityTrayItemViewId = 10001; 155 const int kAccessibilityTrayItemViewId = 10001;
186 } // namespace test 156 } // namespace test
187 157
188 } // namespace ash 158 } // namespace ash
189 159
190 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_CONSTANTS_H_ 160 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_CONSTANTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698