| 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 | |
| 15 // Vertical offset from top of content to the top of find bar. | |
| 16 FIND_BAR_TOOLBAR_OVERLAP, | |
| 17 | |
| 18 // The thickness of the location bar's border. | |
| 19 LOCATION_BAR_BORDER_THICKNESS, | |
| 20 | |
| 21 // The vertical padding between the edge of a location bar bubble and its | 12 // The vertical padding between the edge of a location bar bubble and its |
| 22 // contained text. | 13 // contained text. |
| 23 LOCATION_BAR_BUBBLE_FONT_VERTICAL_PADDING, | 14 LOCATION_BAR_BUBBLE_FONT_VERTICAL_PADDING, |
| 24 | 15 |
| 25 // The additional vertical padding of a bubble. | |
| 26 LOCATION_BAR_BUBBLE_VERTICAL_PADDING, | |
| 27 | |
| 28 // The vertical inset to apply to the bounds of a location bar bubble's anchor | 16 // The vertical inset to apply to the bounds of a location bar bubble's anchor |
| 29 // view, to bring the bubble closer to the anchor. This compensates for the | 17 // view, to bring the bubble closer to the anchor. This compensates for the |
| 30 // space between the bottoms of most such views and the visible bottoms of the | 18 // space between the bottoms of most such views and the visible bottoms of the |
| 31 // images inside. | 19 // images inside. |
| 32 LOCATION_BAR_BUBBLE_ANCHOR_VERTICAL_INSET, | 20 LOCATION_BAR_BUBBLE_ANCHOR_VERTICAL_INSET, |
| 33 | 21 |
| 34 // The height to be occupied by the LocationBar. | 22 // The height to be occupied by the LocationBar. |
| 35 LOCATION_BAR_HEIGHT, | 23 LOCATION_BAR_HEIGHT, |
| 36 | 24 |
| 37 // Space between items in the location bar, as well as between items and the | |
| 38 // edges. | |
| 39 LOCATION_BAR_HORIZONTAL_PADDING, | |
| 40 | |
| 41 // Space between the location bar edge and contents. | |
| 42 LOCATION_BAR_VERTICAL_PADDING, | |
| 43 | |
| 44 // The font size to use in the location bar and omnibox dropdown, in pixels. | |
| 45 OMNIBOX_FONT_PIXEL_SIZE, | |
| 46 | |
| 47 // The amount of overlap between the last tab and the new tab button. | 25 // The amount of overlap between the last tab and the new tab button. |
| 48 TABSTRIP_NEW_TAB_BUTTON_OVERLAP, | 26 TABSTRIP_NEW_TAB_BUTTON_OVERLAP, |
| 49 | 27 |
| 50 // The amount of overlap between two adjacent tabs. | |
| 51 TABSTRIP_TAB_OVERLAP, | |
| 52 | |
| 53 // The horizontal space between a tab's favicon and its title. | |
| 54 TAB_FAVICON_TITLE_SPACING, | |
| 55 | |
| 56 // The height of a tab, including outer strokes. In non-100% scales this is | 28 // The height of a tab, including outer strokes. In non-100% scales this is |
| 57 // slightly larger than the apparent height of the tab, as the top stroke is | 29 // slightly larger than the apparent height of the tab, as the top stroke is |
| 58 // drawn as a 1-px line flush with the bottom of the tab's topmost DIP. | 30 // drawn as a 1-px line flush with the bottom of the tab's topmost DIP. |
| 59 TAB_HEIGHT, | 31 TAB_HEIGHT, |
| 60 | 32 |
| 61 // Width available for content inside a pinned tab. | |
| 62 TAB_PINNED_CONTENT_WIDTH, | |
| 63 | |
| 64 // Padding inside toolbar button, between its border and image. | |
| 65 TOOLBAR_BUTTON_PADDING, | |
| 66 | |
| 67 // Additional horizontal padding between the elements in the toolbar. | 33 // Additional horizontal padding between the elements in the toolbar. |
| 68 TOOLBAR_ELEMENT_PADDING, | 34 TOOLBAR_ELEMENT_PADDING, |
| 69 | 35 |
| 70 // Padding between the right edge of the location bar and the left edge of the | |
| 71 // app menu icon when the browser actions container is not present. | |
| 72 TOOLBAR_LOCATION_BAR_RIGHT_PADDING, | |
| 73 | |
| 74 // The horizontal space between most items in the toolbar. | 36 // The horizontal space between most items in the toolbar. |
| 75 TOOLBAR_STANDARD_SPACING, | 37 TOOLBAR_STANDARD_SPACING, |
| 76 }; | 38 }; |
| 77 | 39 |
| 78 enum LayoutInset { | 40 enum LayoutInset { |
| 79 // The padding inside the tab bounds that defines the tab contents region. | 41 // The padding inside the tab bounds that defines the tab contents region. |
| 80 TAB, | 42 TAB, |
| 81 }; | 43 }; |
| 82 | 44 |
| 83 enum LayoutSize { | 45 enum LayoutSize { |
| 84 // The visible size of the new tab button; does not include any Fitts' Law | 46 // The visible size of the new tab button; does not include any Fitts' Law |
| 85 // extensions. | 47 // extensions. |
| 86 NEW_TAB_BUTTON, | 48 NEW_TAB_BUTTON, |
| 87 }; | 49 }; |
| 88 | 50 |
| 89 int GetLayoutConstant(LayoutConstant constant); | 51 int GetLayoutConstant(LayoutConstant constant); |
| 90 gfx::Insets GetLayoutInsets(LayoutInset inset); | 52 gfx::Insets GetLayoutInsets(LayoutInset inset); |
| 91 gfx::Size GetLayoutSize(LayoutSize size); | 53 gfx::Size GetLayoutSize(LayoutSize size); |
| 92 | 54 |
| 93 #endif // CHROME_BROWSER_UI_LAYOUT_CONSTANTS_H_ | 55 #endif // CHROME_BROWSER_UI_LAYOUT_CONSTANTS_H_ |
| OLD | NEW |