Chromium Code Reviews| Index: chrome/browser/ui/views/layout_constants.h |
| diff --git a/chrome/browser/ui/views/layout_constants.h b/chrome/browser/ui/views/layout_constants.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b52b76e3f9c0ed12c23eacbdc4b4522b24f07c15 |
| --- /dev/null |
| +++ b/chrome/browser/ui/views/layout_constants.h |
| @@ -0,0 +1,63 @@ |
| +// 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
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_VIEWS_LAYOUT_CONSTANTS_H_ |
| +#define CHROME_BROWSER_UI_VIEWS_LAYOUT_CONSTANTS_H_ |
| + |
| +#include "ui/gfx/geometry/insets.h" |
| + |
| +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
|
| + // Additional horizontal padding applied on the trailing edge of icon-label |
| + // views. |
| + ICON_LABEL_VIEW_TRAILING_PADDING, |
| + |
| + // The horizontal space between the edge and a bubble. |
| + LOCATION_BAR_BUBBLE_HORIZONTAL_PADDING, |
| + |
| + // The additional vertical padding of a bubble. |
| + LOCATION_BAR_BUBBLE_VERTICAL_PADDING, |
| + |
| + // The height to be occupied by the LocationBar. For |
| + // MaterialDesignController::NON_MATERIAL the height is determined from image |
| + // assets. |
| + LOCATION_BAR_HEIGHT, |
| + |
| + // Space between items in the location bar, as well as between items and the |
| + // edges. |
| + LOCATION_BAR_HORIZONTAL_PADDING, |
| + |
| + // The vertical padding of items in the location bar. |
| + LOCATION_BAR_VERTICAL_PADDING, |
| + |
| + // The number of pixels in the omnibox dropdown border image interior to |
| + // the actual border. |
| + OMNIBOX_DROPDOWN_BORDER_INTERIOR, |
| + |
| + // Non-ash uses a rounded content area with no shadow in the assets. |
| + // Ash doesn't use a rounded content area and its top edge has an extra |
| + // shadow. |
| + TOOLBAR_VIEW_CONTENT_SHADOW_HEIGHT, |
| + TOOLBAR_VIEW_CONTENT_SHADOW_HEIGHT_ASH, |
| + |
| + // Additional horizontal padding between the elements in the toolbar. |
| + TOOLBAR_VIEW_ELEMENT_PADDING, |
| + |
| + // Padding between the right-edge of the location bar and browser actions. |
| + TOOLBAR_VIEW_LOCATION_BAR_RIGHT_PADDING, |
| + |
| + // The horizontal space between most items. |
| + TOOLBAR_VIEW_STANDARD_SPACING, |
| +}; |
| + |
| +enum LayoutInset { |
| + 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.
|
| + OMNIBOX_DROPDOWN_TEXT, |
| + TOOLBAR_BUTTON, |
| + TOOLBAR_VIEW, |
| +}; |
| + |
| +int GetLayoutConstant(LayoutConstant constant); |
| +gfx::Insets GetLayoutInsets(LayoutInset inset); |
| + |
| +#endif // CHROME_BROWSER_UI_VIEWS_LAYOUT_CONSTANTS_H_ |