Chromium Code Reviews| 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 LayoutDistanceType { | 12 enum class LayoutDistanceType { |
| 13 // Left or right margin. | 13 // Left or right margin. |
| 14 PANEL_HORIZ_MARGIN, | 14 PANEL_HORIZ_MARGIN, |
| 15 // Top or bottom margin. | 15 // Top or bottom margin. |
| 16 PANEL_VERT_MARGIN, | 16 PANEL_VERT_MARGIN, |
| 17 // Horizontal spacing between controls that are logically related. | 17 // Horizontal spacing between controls that are logically related. |
| 18 RELATED_CONTROL_HORIZONTAL_SPACING, | 18 RELATED_CONTROL_HORIZONTAL_SPACING, |
| 19 // Vertical spacing between controls that are logically related. | 19 // Vertical spacing between controls that are logically related. |
| 20 RELATED_CONTROL_VERTICAL_SPACING, | 20 RELATED_CONTROL_VERTICAL_SPACING, |
| 21 // Horizontal spacing between buttons that are logically related. | 21 // Horizontal spacing between buttons that are logically related. |
| 22 RELATED_BUTTON_HORIZONTAL_SPACING, | 22 RELATED_BUTTON_HORIZONTAL_SPACING, |
| 23 // Vertical spacing between controls that are logically unrelated. | 23 // Vertical spacing between controls that are logically unrelated. |
| 24 UNRELATED_CONTROL_VERTICAL_SPACING, | 24 UNRELATED_CONTROL_VERTICAL_SPACING, |
| 25 // Larger horizontal spacing between unrelated controls. | |
| 26 UNRELATED_CONTROL_LARGE_HORIZONTAL_SPACING, | |
|
Peter Kasting
2017/02/02 00:32:30
Once you resync with upstream, you'll want to rena
Bret
2017/02/03 01:47:17
Done.
| |
| 25 // Larger vertical spacing between unrelated controls. | 27 // Larger vertical spacing between unrelated controls. |
| 26 UNRELATED_CONTROL_LARGE_VERTICAL_SPACING, | 28 UNRELATED_CONTROL_LARGE_VERTICAL_SPACING, |
| 27 // Vertical spacing between the edge of the window and the | 29 // Vertical spacing between the edge of the window and the |
| 28 // top or bottom of a button. | 30 // top or bottom of a button. |
| 29 BUTTON_HEDGE_MARGIN_NEW, | 31 BUTTON_HEDGE_MARGIN_NEW, |
| 30 // Horizontal spacing between the edge of the window and the | 32 // Horizontal spacing between the edge of the window and the |
| 31 // left or right of a button. | 33 // left or right of a button. |
| 32 BUTTON_VEDGE_MARGIN_NEW, | 34 BUTTON_VEDGE_MARGIN_NEW, |
| 33 // Indent of checkboxes relative to related text. | 35 // Indent of checkboxes relative to related text. |
| 34 CHECKBOX_INDENT, | 36 CHECKBOX_INDENT, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 | 70 |
| 69 // Returns whether Harmony mode is enabled. This method is deprecated and | 71 // Returns whether Harmony mode is enabled. This method is deprecated and |
| 70 // should only be used in dire circumstances, such as when Harmony specifies a | 72 // should only be used in dire circumstances, such as when Harmony specifies a |
| 71 // different distance type than was previously used. | 73 // different distance type than was previously used. |
| 72 virtual bool IsHarmonyMode() const; | 74 virtual bool IsHarmonyMode() const; |
| 73 | 75 |
| 74 // Returns the preferred width for a dialog of the specified width type. If | 76 // Returns the preferred width for a dialog of the specified width type. If |
| 75 // there is no preferred width for |type|, returns 0. | 77 // there is no preferred width for |type|, returns 0. |
| 76 virtual int GetDialogPreferredWidth(DialogWidthType type) const; | 78 virtual int GetDialogPreferredWidth(DialogWidthType type) const; |
| 77 | 79 |
| 80 // Returns the minimum width for a dialog button. | |
| 81 virtual int GetDialogButtonMinimumWidth() const; | |
| 82 | |
| 78 private: | 83 private: |
| 79 DISALLOW_COPY_AND_ASSIGN(LayoutDelegate); | 84 DISALLOW_COPY_AND_ASSIGN(LayoutDelegate); |
| 80 }; | 85 }; |
| 81 | 86 |
| 82 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_ | 87 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_ |
| OLD | NEW |