OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_ |
7 | 7 |
8 #include "ui/views/layout/grid_layout.h" | 8 #include "ui/views/layout/grid_layout.h" |
9 | 9 |
10 class LayoutDelegate { | 10 class LayoutDelegate { |
11 public: | 11 public: |
12 enum class Metric { | 12 enum class Metric { |
13 // Padding on the left and right side of a button's label. | 13 // Padding on the left and right side of a button's label. |
14 BUTTON_HORIZONTAL_PADDING, | 14 BUTTON_HORIZONTAL_PADDING, |
15 // Default minimum width of a button. | 15 // Default minimum width of a button. |
16 BUTTON_MINIMUM_WIDTH, | 16 BUTTON_MINIMUM_WIDTH, |
17 // Margin between the edge of a dialog and the left, right, or bottom of a | 17 // Margin between the edge of a dialog and the left, right, or bottom of a |
18 // contained button. | 18 // contained button. |
19 DIALOG_BUTTON_MARGIN, | 19 DIALOG_BUTTON_MARGIN, |
20 // Minimum width of a dialog button. | 20 // Minimum width of a dialog button. |
21 DIALOG_BUTTON_MINIMUM_WIDTH, | 21 DIALOG_BUTTON_MINIMUM_WIDTH, |
22 // Spacing between a dialog button and the content above it. | 22 // Spacing between a dialog button and the content above it. |
23 DIALOG_BUTTON_TOP_SPACING, | 23 DIALOG_BUTTON_TOP_SPACING, |
24 // Horizontal or vertical margin between the edge of a dialog and the close | 24 // Horizontal or vertical margin between the edge of a dialog and the close |
25 // button in the upper trailing corner. | 25 // button in the upper trailing corner. |
26 DIALOG_CLOSE_BUTTON_MARGIN, | 26 DIALOG_CLOSE_BUTTON_MARGIN, |
| 27 // Horizontal spacing between the image/icon on a label button and its |
| 28 // associated text. This includes checkboxes and radio buttons. |
| 29 ICON_TEXT_SPACING, |
27 // Horizontal or vertical margin between the edge of a panel and the | 30 // Horizontal or vertical margin between the edge of a panel and the |
28 // contained content. | 31 // contained content. |
29 PANEL_CONTENT_MARGIN, | 32 PANEL_CONTENT_MARGIN, |
30 // Horizontal spacing between buttons that are logically related, e.g. | 33 // Horizontal spacing between buttons that are logically related, e.g. |
31 // for a button set. | 34 // for a button set. |
32 RELATED_BUTTON_HORIZONTAL_SPACING, | 35 RELATED_BUTTON_HORIZONTAL_SPACING, |
33 // Horizontal spacing between other controls that are logically related. | 36 // Horizontal spacing between other controls that are logically related. |
34 RELATED_CONTROL_HORIZONTAL_SPACING, | 37 RELATED_CONTROL_HORIZONTAL_SPACING, |
35 // Vertical spacing between controls that are logically related. | 38 // Vertical spacing between controls that are logically related. |
36 RELATED_CONTROL_VERTICAL_SPACING, | 39 RELATED_CONTROL_VERTICAL_SPACING, |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 93 |
91 // Returns the preferred width in DIPs for a dialog of the specified |width|. | 94 // Returns the preferred width in DIPs for a dialog of the specified |width|. |
92 // May return 0 if the dialog has no preferred width. | 95 // May return 0 if the dialog has no preferred width. |
93 virtual int GetDialogPreferredWidth(DialogWidth width) const; | 96 virtual int GetDialogPreferredWidth(DialogWidth width) const; |
94 | 97 |
95 private: | 98 private: |
96 DISALLOW_COPY_AND_ASSIGN(LayoutDelegate); | 99 DISALLOW_COPY_AND_ASSIGN(LayoutDelegate); |
97 }; | 100 }; |
98 | 101 |
99 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_ | 102 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_ |
OLD | NEW |