| 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 // Horizontal or vertical margin between the edge of a dialog and a | 13 // Horizontal or vertical margin between the edge of a dialog and a |
| 14 // contained button. | 14 // contained button. |
| 15 DIALOG_BUTTON_MARGIN, | 15 DIALOG_BUTTON_MARGIN, |
| 16 // Horizontal or vertical margin between the edge of a panel and the | 16 // Horizontal or vertical margin between the edge of a panel and the |
| 17 // contained content. | 17 // contained content. |
| 18 PANEL_CONTENT_MARGIN, | 18 PANEL_CONTENT_MARGIN, |
| 19 // Horizontal spacing between buttons that are logically related, e.g. | 19 // Horizontal spacing between buttons that are logically related, e.g. |
| 20 // for a button set. | 20 // for a button set. |
| 21 RELATED_BUTTON_HORIZONTAL_SPACING, | 21 RELATED_BUTTON_HORIZONTAL_SPACING, |
| 22 // Horizontal spacing between other controls that are logically related. | 22 // Horizontal spacing between other controls that are logically related. |
| 23 RELATED_CONTROL_HORIZONTAL_SPACING, | 23 RELATED_CONTROL_HORIZONTAL_SPACING, |
| 24 // Vertical spacing between controls that are logically related. | 24 // Vertical spacing between controls that are logically related. |
| 25 RELATED_CONTROL_VERTICAL_SPACING, | 25 RELATED_CONTROL_VERTICAL_SPACING, |
| 26 // Horizontal spacing between an item such as an icon or checkbox and a |
| 27 // label related to it. |
| 28 RELATED_LABEL_HORIZONTAL_SPACING, |
| 26 // Horizontal indent of a subsection relative to related items above, e.g. | 29 // Horizontal indent of a subsection relative to related items above, e.g. |
| 27 // checkboxes below explanatory text/headings. | 30 // checkboxes below explanatory text/headings. |
| 28 SUBSECTION_HORIZONTAL_INDENT, | 31 SUBSECTION_HORIZONTAL_INDENT, |
| 29 // Vertical spacing between controls that are logically unrelated. | 32 // Vertical spacing between controls that are logically unrelated. |
| 30 UNRELATED_CONTROL_VERTICAL_SPACING, | 33 UNRELATED_CONTROL_VERTICAL_SPACING, |
| 31 // Larger vertical spacing between unrelated controls. | 34 // Larger vertical spacing between unrelated controls. |
| 32 UNRELATED_CONTROL_VERTICAL_SPACING_LARGE, | 35 UNRELATED_CONTROL_VERTICAL_SPACING_LARGE, |
| 33 }; | 36 }; |
| 34 | 37 |
| 35 enum class DialogWidth { | 38 enum class DialogWidth { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 75 |
| 73 // Returns the preferred width in DIPs for a dialog of the specified |width|. | 76 // Returns the preferred width in DIPs for a dialog of the specified |width|. |
| 74 // May return 0 if the dialog has no preferred width. | 77 // May return 0 if the dialog has no preferred width. |
| 75 virtual int GetDialogPreferredWidth(DialogWidth width) const; | 78 virtual int GetDialogPreferredWidth(DialogWidth width) const; |
| 76 | 79 |
| 77 private: | 80 private: |
| 78 DISALLOW_COPY_AND_ASSIGN(LayoutDelegate); | 81 DISALLOW_COPY_AND_ASSIGN(LayoutDelegate); |
| 79 }; | 82 }; |
| 80 | 83 |
| 81 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_ | 84 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_ |
| OLD | NEW |