OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CHROME_BROWSER_UI_LAYOUT_CONSTANTS_H_ | 5 #ifndef CHROME_BROWSER_UI_LAYOUT_CONSTANTS_H_ |
6 #define CHROME_BROWSER_UI_LAYOUT_CONSTANTS_H_ | 6 #define CHROME_BROWSER_UI_LAYOUT_CONSTANTS_H_ |
7 | 7 |
8 #include "ui/gfx/geometry/insets.h" | 8 #include "ui/gfx/geometry/insets.h" |
9 #include "ui/gfx/geometry/size.h" | 9 #include "ui/gfx/geometry/size.h" |
10 | 10 |
11 enum LayoutConstant { | 11 enum LayoutConstant { |
12 // The padding on the left, right, and bottom of the avatar icon. | |
13 AVATAR_ICON_PADDING, | |
14 | |
12 // Vertical offset from top of content to the top of find bar. | 15 // Vertical offset from top of content to the top of find bar. |
13 FIND_BAR_TOOLBAR_OVERLAP, | 16 FIND_BAR_TOOLBAR_OVERLAP, |
14 | 17 |
15 // The thickness of the location bar's border. | 18 // The thickness of the location bar's border. |
16 LOCATION_BAR_BORDER_THICKNESS, | 19 LOCATION_BAR_BORDER_THICKNESS, |
17 | 20 |
18 // The vertical padding between the edge of a location bar bubble and its | 21 // The vertical padding between the edge of a location bar bubble and its |
19 // contained text. | 22 // contained text. |
20 LOCATION_BAR_BUBBLE_FONT_VERTICAL_PADDING, | 23 LOCATION_BAR_BUBBLE_FONT_VERTICAL_PADDING, |
21 | 24 |
(...skipping 29 matching lines...) Expand all Loading... | |
51 TAB_FAVICON_TITLE_SPACING, | 54 TAB_FAVICON_TITLE_SPACING, |
52 | 55 |
53 // The height of a tab, including outer strokes. In non-100% scales this is | 56 // The height of a tab, including outer strokes. In non-100% scales this is |
54 // slightly larger than the apparent height of the tab, as the top stroke is | 57 // slightly larger than the apparent height of the tab, as the top stroke is |
55 // drawn as a 1-px line flush with the bottom of the tab's topmost DIP. | 58 // drawn as a 1-px line flush with the bottom of the tab's topmost DIP. |
56 TAB_HEIGHT, | 59 TAB_HEIGHT, |
57 | 60 |
58 // Width available for content inside a pinned tab. | 61 // Width available for content inside a pinned tab. |
59 TAB_PINNED_CONTENT_WIDTH, | 62 TAB_PINNED_CONTENT_WIDTH, |
60 | 63 |
64 // Spacing inside toolbar button, between its border and image. | |
Peter Kasting
2016/11/22 22:12:07
Nit: Spacing -> Padding
Evan Stade
2016/11/29 03:01:45
Done.
| |
65 TOOLBAR_BUTTON_PADDING, | |
66 | |
61 // Additional horizontal padding between the elements in the toolbar. | 67 // Additional horizontal padding between the elements in the toolbar. |
62 TOOLBAR_ELEMENT_PADDING, | 68 TOOLBAR_ELEMENT_PADDING, |
63 | 69 |
64 // Padding between the right edge of the location bar and the left edge of the | 70 // Padding between the right edge of the location bar and the left edge of the |
65 // app menu icon when the browser actions container is not present. | 71 // app menu icon when the browser actions container is not present. |
66 TOOLBAR_LOCATION_BAR_RIGHT_PADDING, | 72 TOOLBAR_LOCATION_BAR_RIGHT_PADDING, |
67 | 73 |
68 // The horizontal space between most items in the toolbar. | 74 // The horizontal space between most items in the toolbar. |
69 TOOLBAR_STANDARD_SPACING, | 75 TOOLBAR_STANDARD_SPACING, |
70 }; | 76 }; |
71 | 77 |
72 enum LayoutInset { | 78 enum LayoutInset { |
73 // The padding between the avatar icon and the frame border on the left, the | |
74 // tabstrip on the right, and the toolbar on the bottom. | |
75 AVATAR_ICON, | |
76 | |
77 // The padding above the top row and below the bottom row in the omnibox | |
78 // dropdown. | |
79 OMNIBOX_DROPDOWN, | |
80 | |
81 // In an omnibox dropdown row, the minimum distance between the icon and the | |
82 // row edge. | |
83 OMNIBOX_DROPDOWN_ICON, | |
84 | |
85 // In an omnibox dropdown row, the minimum distance between the text and the | |
86 // row edge. | |
87 OMNIBOX_DROPDOWN_TEXT, | |
88 | |
89 // The padding inside the tab bounds that defines the tab contents region. | 79 // The padding inside the tab bounds that defines the tab contents region. |
90 TAB, | 80 TAB, |
91 | |
92 // The minimum padding of the toolbar. The edge graphics have some built-in | |
93 // spacing, shadowing, so this accounts for that as well. | |
94 TOOLBAR, | |
95 | |
96 // The spacing between a ToolbarButton's image and its border. | |
97 TOOLBAR_BUTTON, | |
98 }; | 81 }; |
99 | 82 |
100 enum LayoutSize { | 83 enum LayoutSize { |
101 // The visible size of the new tab button; does not include any Fitts' Law | 84 // The visible size of the new tab button; does not include any Fitts' Law |
102 // extensions. | 85 // extensions. |
103 NEW_TAB_BUTTON, | 86 NEW_TAB_BUTTON, |
104 }; | 87 }; |
105 | 88 |
106 int GetLayoutConstant(LayoutConstant constant); | 89 int GetLayoutConstant(LayoutConstant constant); |
107 gfx::Insets GetLayoutInsets(LayoutInset inset); | 90 gfx::Insets GetLayoutInsets(LayoutInset inset); |
108 gfx::Size GetLayoutSize(LayoutSize size); | 91 gfx::Size GetLayoutSize(LayoutSize size); |
109 | 92 |
110 #endif // CHROME_BROWSER_UI_LAYOUT_CONSTANTS_H_ | 93 #endif // CHROME_BROWSER_UI_LAYOUT_CONSTANTS_H_ |
OLD | NEW |