| 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 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 // The font size to use in the location bar and omnibox dropdown, in pixels. | 48 // The font size to use in the location bar and omnibox dropdown, in pixels. |
| 49 OMNIBOX_FONT_PIXEL_SIZE, | 49 OMNIBOX_FONT_PIXEL_SIZE, |
| 50 | 50 |
| 51 // The amount of overlap between the last tab and the new tab button. | 51 // The amount of overlap between the last tab and the new tab button. |
| 52 TABSTRIP_NEW_TAB_BUTTON_OVERLAP, | 52 TABSTRIP_NEW_TAB_BUTTON_OVERLAP, |
| 53 | 53 |
| 54 // The amount of overlap between two adjacent tabs. | 54 // The amount of overlap between two adjacent tabs. |
| 55 TABSTRIP_TAB_OVERLAP, | 55 TABSTRIP_TAB_OVERLAP, |
| 56 | 56 |
| 57 // The vertical overlap of the tabstrip atop the toolbar. | |
| 58 TABSTRIP_TOOLBAR_OVERLAP, | |
| 59 | |
| 60 // The amount by which the tab close button should overlap the trailing | |
| 61 // padding region after the tab's contents region. | |
| 62 TAB_CLOSE_BUTTON_TRAILING_PADDING_OVERLAP, | |
| 63 | |
| 64 // The horizontal space between a tab's favicon and its title. | 57 // The horizontal space between a tab's favicon and its title. |
| 65 TAB_FAVICON_TITLE_SPACING, | 58 TAB_FAVICON_TITLE_SPACING, |
| 66 | 59 |
| 67 // The height of a tab, including outer strokes. In non-100% scales this is | 60 // The height of a tab, including outer strokes. In non-100% scales this is |
| 68 // slightly larger than the apparent height of the tab, as the top stroke is | 61 // slightly larger than the apparent height of the tab, as the top stroke is |
| 69 // drawn as a 1-px line flush with the bottom of the tab's topmost DIP. | 62 // drawn as a 1-px line flush with the bottom of the tab's topmost DIP. |
| 70 TAB_HEIGHT, | 63 TAB_HEIGHT, |
| 71 | 64 |
| 72 // Width available for content inside a pinned tab. | 65 // Width available for content inside a pinned tab. |
| 73 TAB_PINNED_CONTENT_WIDTH, | 66 TAB_PINNED_CONTENT_WIDTH, |
| 74 | 67 |
| 75 // Height of the region atop the tab bounds that is normally excluded when | |
| 76 // calculating the tab hit test region or considering where to paint a | |
| 77 // custom theme background. (Based on theme behavior it seems like at some | |
| 78 // point this was added to the area above the top of the tab images, and we | |
| 79 // now need to subtract it back off to compensate.) | |
| 80 TAB_TOP_EXCLUSION_HEIGHT, | |
| 81 | |
| 82 // Non-ash uses a rounded content area with no shadow in the assets. | |
| 83 // Ash doesn't use a rounded content area and its top edge has an extra | |
| 84 // shadow. | |
| 85 TOOLBAR_CONTENT_SHADOW_HEIGHT, | |
| 86 TOOLBAR_CONTENT_SHADOW_HEIGHT_ASH, | |
| 87 | |
| 88 // Additional horizontal padding between the elements in the toolbar. | 68 // Additional horizontal padding between the elements in the toolbar. |
| 89 TOOLBAR_ELEMENT_PADDING, | 69 TOOLBAR_ELEMENT_PADDING, |
| 90 | 70 |
| 91 // Padding between the right edge of the location bar and the left edge of the | 71 // Padding between the right edge of the location bar and the left edge of the |
| 92 // app menu icon when the browser actions container is not present. | 72 // app menu icon when the browser actions container is not present. |
| 93 TOOLBAR_LOCATION_BAR_RIGHT_PADDING, | 73 TOOLBAR_LOCATION_BAR_RIGHT_PADDING, |
| 94 | 74 |
| 95 // The horizontal space between most items in the toolbar. | 75 // The horizontal space between most items in the toolbar. |
| 96 TOOLBAR_STANDARD_SPACING, | 76 TOOLBAR_STANDARD_SPACING, |
| 97 }; | 77 }; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 128 // The visible size of the new tab button; does not include any Fitts' Law | 108 // The visible size of the new tab button; does not include any Fitts' Law |
| 129 // extensions. | 109 // extensions. |
| 130 NEW_TAB_BUTTON, | 110 NEW_TAB_BUTTON, |
| 131 }; | 111 }; |
| 132 | 112 |
| 133 int GetLayoutConstant(LayoutConstant constant); | 113 int GetLayoutConstant(LayoutConstant constant); |
| 134 gfx::Insets GetLayoutInsets(LayoutInset inset); | 114 gfx::Insets GetLayoutInsets(LayoutInset inset); |
| 135 gfx::Size GetLayoutSize(LayoutSize size); | 115 gfx::Size GetLayoutSize(LayoutSize size); |
| 136 | 116 |
| 137 #endif // CHROME_BROWSER_UI_LAYOUT_CONSTANTS_H_ | 117 #endif // CHROME_BROWSER_UI_LAYOUT_CONSTANTS_H_ |
| OLD | NEW |