Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
|
tdanderson
2015/09/14 15:33:09
In https://chromiumcodereview.appspot.com/13061730
Peter Kasting
2015/09/14 21:06:31
I would consider that a layout constant. It's a c
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_LAYOUT_CONSTANTS_H_ | |
| 6 #define CHROME_BROWSER_UI_VIEWS_LAYOUT_CONSTANTS_H_ | |
| 7 | |
| 8 #include "ui/gfx/geometry/insets.h" | |
| 9 | |
| 10 enum LayoutConstant { | |
|
jonross
2015/09/14 15:27:10
Any concerns about these being in the global names
Peter Kasting
2015/09/14 21:06:31
Not really, since few people should be pulling thi
jonross
2015/09/14 23:46:43
SGTM
| |
| 11 // Additional horizontal padding applied on the trailing edge of icon-label | |
| 12 // views. | |
| 13 ICON_LABEL_VIEW_TRAILING_PADDING, | |
| 14 | |
| 15 // The horizontal space between the edge and a bubble. | |
| 16 LOCATION_BAR_BUBBLE_HORIZONTAL_PADDING, | |
| 17 | |
| 18 // The additional vertical padding of a bubble. | |
| 19 LOCATION_BAR_BUBBLE_VERTICAL_PADDING, | |
| 20 | |
| 21 // The height to be occupied by the LocationBar. For | |
| 22 // MaterialDesignController::NON_MATERIAL the height is determined from image | |
| 23 // assets. | |
| 24 LOCATION_BAR_HEIGHT, | |
| 25 | |
| 26 // Space between items in the location bar, as well as between items and the | |
| 27 // edges. | |
| 28 LOCATION_BAR_HORIZONTAL_PADDING, | |
| 29 | |
| 30 // The vertical padding of items in the location bar. | |
| 31 LOCATION_BAR_VERTICAL_PADDING, | |
| 32 | |
| 33 // The number of pixels in the omnibox dropdown border image interior to | |
| 34 // the actual border. | |
| 35 OMNIBOX_DROPDOWN_BORDER_INTERIOR, | |
| 36 | |
| 37 // Non-ash uses a rounded content area with no shadow in the assets. | |
| 38 // Ash doesn't use a rounded content area and its top edge has an extra | |
| 39 // shadow. | |
| 40 TOOLBAR_VIEW_CONTENT_SHADOW_HEIGHT, | |
| 41 TOOLBAR_VIEW_CONTENT_SHADOW_HEIGHT_ASH, | |
| 42 | |
| 43 // Additional horizontal padding between the elements in the toolbar. | |
| 44 TOOLBAR_VIEW_ELEMENT_PADDING, | |
| 45 | |
| 46 // Padding between the right-edge of the location bar and browser actions. | |
| 47 TOOLBAR_VIEW_LOCATION_BAR_RIGHT_PADDING, | |
| 48 | |
| 49 // The horizontal space between most items. | |
| 50 TOOLBAR_VIEW_STANDARD_SPACING, | |
| 51 }; | |
| 52 | |
| 53 enum LayoutInset { | |
| 54 OMNIBOX_DROPDOWN_ICON, | |
|
tdanderson
2015/09/14 15:33:08
nit: It would be nice to have documentation for ea
Peter Kasting
2015/09/14 21:06:31
Done.
| |
| 55 OMNIBOX_DROPDOWN_TEXT, | |
| 56 TOOLBAR_BUTTON, | |
| 57 TOOLBAR_VIEW, | |
| 58 }; | |
| 59 | |
| 60 int GetLayoutConstant(LayoutConstant constant); | |
| 61 gfx::Insets GetLayoutInsets(LayoutInset inset); | |
| 62 | |
| 63 #endif // CHROME_BROWSER_UI_VIEWS_LAYOUT_CONSTANTS_H_ | |
| OLD | NEW |