| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #ifndef UI_VIEWS_LAYOUT_LAYOUT_CONSTANTS_H_ | |
| 6 #define UI_VIEWS_LAYOUT_LAYOUT_CONSTANTS_H_ | |
| 7 | |
| 8 #include "build/build_config.h" | |
| 9 #include "ui/views/layout/grid_layout.h" | |
| 10 | |
| 11 // This file contains some constants we use to implement our standard panel | |
| 12 // layout. | |
| 13 // see: spec 21/4 | |
| 14 | |
| 15 namespace views { | |
| 16 | |
| 17 // Left or right margin. | |
| 18 constexpr int kPanelHorizMargin = 13; | |
| 19 | |
| 20 // Top or bottom margin. | |
| 21 constexpr int kPanelVertMargin = 13; | |
| 22 | |
| 23 // When several controls are aligned vertically, the baseline should be spaced | |
| 24 // by the following number of pixels. | |
| 25 constexpr int kPanelVerticalSpacing = 32; | |
| 26 | |
| 27 // Vertical spacing between sub UI. | |
| 28 constexpr int kPanelSubVerticalSpacing = 24; | |
| 29 | |
| 30 // Vertical spacing between a label and some control. | |
| 31 constexpr int kLabelToControlVerticalSpacing = 8; | |
| 32 | |
| 33 // Small horizontal spacing between controls that are logically related. | |
| 34 constexpr int kRelatedControlSmallHorizontalSpacing = 8; | |
| 35 | |
| 36 // Horizontal spacing between controls that are logically related. | |
| 37 constexpr int kRelatedControlHorizontalSpacing = 8; | |
| 38 | |
| 39 // Vertical spacing between controls that are logically related. | |
| 40 constexpr int kRelatedControlVerticalSpacing = 8; | |
| 41 | |
| 42 // Small vertical spacing between controls that are logically related. | |
| 43 constexpr int kRelatedControlSmallVerticalSpacing = 4; | |
| 44 | |
| 45 // Horizontal spacing between controls that are logically unrelated. | |
| 46 constexpr int kUnrelatedControlHorizontalSpacing = 12; | |
| 47 | |
| 48 // Larger horizontal spacing between unrelated controls. | |
| 49 constexpr int kUnrelatedControlLargeHorizontalSpacing = 20; | |
| 50 | |
| 51 // Vertical spacing between controls that are logically unrelated. | |
| 52 constexpr int kUnrelatedControlVerticalSpacing = 20; | |
| 53 | |
| 54 // Larger vertical spacing between unrelated controls. | |
| 55 constexpr int kUnrelatedControlLargeVerticalSpacing = 30; | |
| 56 | |
| 57 // Vertical spacing between the edge of the window and the | |
| 58 // top or bottom of a button. | |
| 59 constexpr int kButtonVEdgeMargin = 9; | |
| 60 | |
| 61 // Horizontal spacing between the edge of the window and the | |
| 62 // left or right of a button. | |
| 63 constexpr int kButtonHEdgeMargin = 13; | |
| 64 | |
| 65 // Vertical spacing between the edge of the window and the | |
| 66 // top or bottom of a button (when using new style dialogs). | |
| 67 constexpr int kButtonVEdgeMarginNew = 20; | |
| 68 | |
| 69 // Horizontal spacing between the edge of the window and the | |
| 70 // left or right of a button (when using new style dialogs). | |
| 71 constexpr int kButtonHEdgeMarginNew = 20; | |
| 72 | |
| 73 // Spacing between the edge of the window and the edge of the close button. | |
| 74 constexpr int kCloseButtonMargin = 7; | |
| 75 | |
| 76 // Horizontal spacing between buttons that are logically related. | |
| 77 constexpr int kRelatedButtonHSpacing = 6; | |
| 78 | |
| 79 // Indent of checkboxes relative to related text. | |
| 80 constexpr int kCheckboxIndent = 10; | |
| 81 | |
| 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 constexpr int kItemLabelSpacing = 10; | |
| 85 | |
| 86 // Padding on the left and right of a button's contents. | |
| 87 const int kButtonHorizontalPadding = 16; | |
| 88 | |
| 89 // Default minimum width of buttons. | |
| 90 const int kMinimumButtonWidth = 48; | |
| 91 | |
| 92 // Minimum width of dialog buttons. | |
| 93 constexpr int kDialogMinimumButtonWidth = 75; | |
| 94 | |
| 95 // Extra space around vector buttons to increase their event target size. | |
| 96 constexpr int kVectorButtonExtraTouchSize = 4; | |
| 97 | |
| 98 } // namespace views | |
| 99 | |
| 100 #endif // UI_VIEWS_LAYOUT_LAYOUT_CONSTANTS_H_ | |
| OLD | NEW |