| 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 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 |
| 13 // contained text. | 13 // contained text. |
| 14 LOCATION_BAR_BUBBLE_FONT_VERTICAL_PADDING, | 14 LOCATION_BAR_BUBBLE_FONT_VERTICAL_PADDING, |
| 15 | 15 |
| 16 // 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 |
| 17 // 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 |
| 18 // 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 |
| 19 // images inside. | 19 // images inside. |
| 20 LOCATION_BAR_BUBBLE_ANCHOR_VERTICAL_INSET, | 20 LOCATION_BAR_BUBBLE_ANCHOR_VERTICAL_INSET, |
| 21 | 21 |
| 22 // The horizontal padding between location bar decorations as well as the |
| 23 // vertical and horizontal padding inside the border. |
| 24 LOCATION_BAR_ELEMENT_PADDING, |
| 25 |
| 22 // The height to be occupied by the LocationBar. | 26 // The height to be occupied by the LocationBar. |
| 23 LOCATION_BAR_HEIGHT, | 27 LOCATION_BAR_HEIGHT, |
| 24 | 28 |
| 25 // The amount of overlap between the last tab and the new tab button. | 29 // The amount of overlap between the last tab and the new tab button. |
| 26 TABSTRIP_NEW_TAB_BUTTON_OVERLAP, | 30 TABSTRIP_NEW_TAB_BUTTON_OVERLAP, |
| 27 | 31 |
| 28 // The height of a tab, including outer strokes. In non-100% scales this is | 32 // The height of a tab, including outer strokes. In non-100% scales this is |
| 29 // slightly larger than the apparent height of the tab, as the top stroke is | 33 // slightly larger than the apparent height of the tab, as the top stroke is |
| 30 // drawn as a 1-px line flush with the bottom of the tab's topmost DIP. | 34 // drawn as a 1-px line flush with the bottom of the tab's topmost DIP. |
| 31 TAB_HEIGHT, | 35 TAB_HEIGHT, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 46 // The visible size of the new tab button; does not include any Fitts' Law | 50 // The visible size of the new tab button; does not include any Fitts' Law |
| 47 // extensions. | 51 // extensions. |
| 48 NEW_TAB_BUTTON, | 52 NEW_TAB_BUTTON, |
| 49 }; | 53 }; |
| 50 | 54 |
| 51 int GetLayoutConstant(LayoutConstant constant); | 55 int GetLayoutConstant(LayoutConstant constant); |
| 52 gfx::Insets GetLayoutInsets(LayoutInset inset); | 56 gfx::Insets GetLayoutInsets(LayoutInset inset); |
| 53 gfx::Size GetLayoutSize(LayoutSize size); | 57 gfx::Size GetLayoutSize(LayoutSize size); |
| 54 | 58 |
| 55 #endif // CHROME_BROWSER_UI_LAYOUT_CONSTANTS_H_ | 59 #endif // CHROME_BROWSER_UI_LAYOUT_CONSTANTS_H_ |
| OLD | NEW |