OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 UI_VIEWS_LAYOUT_LAYOUT_CONSTANTS_H_ | 5 #ifndef UI_VIEWS_LAYOUT_LAYOUT_CONSTANTS_H_ |
6 #define UI_VIEWS_LAYOUT_LAYOUT_CONSTANTS_H_ | 6 #define UI_VIEWS_LAYOUT_LAYOUT_CONSTANTS_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "ui/views/layout/grid_layout.h" | 9 #include "ui/views/layout/grid_layout.h" |
10 | 10 |
11 // This file contains some constants we use to implement our standard panel | 11 // This file contains some constants we use to implement our standard panel |
12 // layout. | 12 // layout. |
13 // see: spec 21/4 | 13 // see: spec 21/4 |
14 | 14 |
15 namespace views { | 15 namespace views { |
16 | 16 |
17 // Left or right margin. | 17 // Left or right margin. |
18 const int kPanelHorizMargin = 13; | 18 const int kPanelHorizMargin = 13; |
19 | 19 |
20 // Top or bottom margin. | 20 // Top or bottom margin. |
21 const int kPanelVertMargin = 13; | 21 const int kPanelVertMargin = 13; |
22 | 22 |
23 // When several controls are aligned vertically, the baseline should be spaced | 23 // When several controls are aligned vertically, the baseline should be spaced |
24 // by the following number of pixels. | 24 // by the following number of pixels. |
25 const int kPanelVerticalSpacing = 32; | 25 const int kPanelVerticalSpacing = 32; |
26 | 26 |
27 // Vertical spacing between sub UI. | 27 // Vertical spacing between sub UI. |
28 const int kPanelSubVerticalSpacing = 24; | 28 const int kPanelSubVerticalSpacing = 24; |
29 | 29 |
30 // Vertical spacing between the edge of the menu and the top or bottom of the | |
31 // menu items in material design. | |
Evan Stade
2016/06/10 17:39:46
I have no idea what menu this comment is referring
Jane
2016/06/10 18:49:16
I thought this would be a common constant used by
| |
32 const int kMaterialVerticalMargin = 16; | |
Evan Stade
2016/06/10 17:39:46
this is a rather unhelpful name. Pretend we're in
Jane
2016/06/10 18:49:16
Same thought but this name does need more details.
| |
33 | |
34 // Horizontal spacing between the edge of the menu and the left or right of the | |
35 // menu items in material design. | |
36 const int kMaterialHorizontalMargin = 16; | |
37 | |
30 // Vertical spacing between a label and some control. | 38 // Vertical spacing between a label and some control. |
31 const int kLabelToControlVerticalSpacing = 8; | 39 const int kLabelToControlVerticalSpacing = 8; |
32 | 40 |
33 // Small horizontal spacing between controls that are logically related. | 41 // Small horizontal spacing between controls that are logically related. |
34 const int kRelatedControlSmallHorizontalSpacing = 8; | 42 const int kRelatedControlSmallHorizontalSpacing = 8; |
35 | 43 |
36 // Horizontal spacing between controls that are logically related. | 44 // Horizontal spacing between controls that are logically related. |
37 const int kRelatedControlHorizontalSpacing = 8; | 45 const int kRelatedControlHorizontalSpacing = 8; |
38 | 46 |
39 // Vertical spacing between controls that are logically related. | 47 // Vertical spacing between controls that are logically related. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
83 // Horizontal alignment used for a control's introductory label in a GridLayout. | 91 // Horizontal alignment used for a control's introductory label in a GridLayout. |
84 #if defined(OS_MACOSX) | 92 #if defined(OS_MACOSX) |
85 const GridLayout::Alignment kControlLabelGridAlignment = GridLayout::TRAILING; | 93 const GridLayout::Alignment kControlLabelGridAlignment = GridLayout::TRAILING; |
86 #else | 94 #else |
87 const GridLayout::Alignment kControlLabelGridAlignment = GridLayout::LEADING; | 95 const GridLayout::Alignment kControlLabelGridAlignment = GridLayout::LEADING; |
88 #endif | 96 #endif |
89 | 97 |
90 } // namespace views | 98 } // namespace views |
91 | 99 |
92 #endif // UI_VIEWS_LAYOUT_LAYOUT_CONSTANTS_H_ | 100 #endif // UI_VIEWS_LAYOUT_LAYOUT_CONSTANTS_H_ |
OLD | NEW |