Automated Commit: Committing new LKGM version 7479.0.0 for chromeos.
[chromium-blink-merge.git] / ui / views / layout / layout_constants.h
blob28d16b71c74f6c08a680540416b5a08662582138
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_VIEWS_LAYOUT_LAYOUT_CONSTANTS_H_
6 #define UI_VIEWS_LAYOUT_LAYOUT_CONSTANTS_H_
8 #include "build/build_config.h"
9 #include "ui/views/layout/grid_layout.h"
11 // This file contains some constants we use to implement our standard panel
12 // layout.
13 // see: spec 21/4
15 namespace views {
17 // Left or right margin.
18 const int kPanelHorizMargin = 13;
20 // Top or bottom margin.
21 const int kPanelVertMargin = 13;
23 // If some UI has some sub UI. Indent horizontally by the following value.
24 const int kPanelHorizIndentation = 24;
26 // When several controls are aligned vertically, the baseline should be spaced
27 // by the following number of pixels.
28 const int kPanelVerticalSpacing = 32;
30 // Vertical spacing between sub UI.
31 const int kPanelSubVerticalSpacing = 24;
33 // Vertical spacing between a label and some control.
34 const int kLabelToControlVerticalSpacing = 8;
36 // Small horizontal spacing between controls that are logically related.
37 const int kRelatedControlSmallHorizontalSpacing = 8;
39 // Horizontal spacing between controls that are logically related.
40 const int kRelatedControlHorizontalSpacing = 8;
42 // Vertical spacing between controls that are logically related.
43 const int kRelatedControlVerticalSpacing = 8;
45 // Small vertical spacing between controls that are logically related.
46 const int kRelatedControlSmallVerticalSpacing = 4;
48 // Horizontal spacing between controls that are logically unrelated.
49 const int kUnrelatedControlHorizontalSpacing = 12;
51 // Larger horizontal spacing between unrelated controls.
52 const int kUnrelatedControlLargeHorizontalSpacing = 20;
54 // Vertical spacing between controls that are logically unrelated.
55 const int kUnrelatedControlVerticalSpacing = 20;
57 // Larger vertical spacing between unrelated controls.
58 const int kUnrelatedControlLargeVerticalSpacing = 30;
60 // Vertical spacing between the edge of the window and the
61 // top or bottom of a button.
62 const int kButtonVEdgeMargin = 9;
64 // Vertical spacing between the edge of the window and the
65 // left or right of a button.
66 const int kButtonHEdgeMargin = 13;
68 // Vertical spacing between the edge of the window and the
69 // top or bottom of a button (when using new style dialogs).
70 const int kButtonVEdgeMarginNew = 20;
72 // Vertical spacing between the edge of the window and the
73 // left or right of a button (when using new style dialogs).
74 const int kButtonHEdgeMarginNew = 20;
76 // Horizontal spacing between buttons that are logically related.
77 const int kRelatedButtonHSpacing = 6;
79 // Indent of checkboxes relative to related text.
80 const int kCheckboxIndent = 10;
82 // Horizontal spacing between the end of an item (i.e. an icon or a checkbox)
83 // and the start of its corresponding text.
84 const int kItemLabelSpacing = 10;
86 // Horizontal alignment used for a control's introductory label in a GridLayout.
87 #if defined(OS_MACOSX)
88 const GridLayout::Alignment kControlLabelGridAlignment = GridLayout::TRAILING;
89 #else
90 const GridLayout::Alignment kControlLabelGridAlignment = GridLayout::LEADING;
91 #endif
93 } // namespace views
95 #endif // UI_VIEWS_LAYOUT_LAYOUT_CONSTANTS_H_