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_CHROME_LAYOUT_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_HARMONY_CHROME_LAYOUT_PROVIDER_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_HARMONY_CHROME_LAYOUT_PROVIDER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_HARMONY_CHROME_LAYOUT_PROVIDER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "ui/gfx/geometry/insets.h" | 11 #include "ui/gfx/geometry/insets.h" |
12 #include "ui/views/layout/grid_layout.h" | 12 #include "ui/views/layout/grid_layout.h" |
13 #include "ui/views/layout/layout_provider.h" | 13 #include "ui/views/layout/layout_provider.h" |
14 | 14 |
15 enum ChromeDistanceMetric { | 15 enum ChromeDistanceMetric { |
16 // The maximum width a button can have and still influence the sizes of | |
17 // other linked buttons. This allows short buttons to have linked widths | |
18 // without long buttons making things overly wide. | |
19 DISTANCE_BUTTON_MAX_LINKABLE_WIDTH = views::VIEWS_DISTANCE_END, | |
20 // Default minimum width of a button. | 16 // Default minimum width of a button. |
21 DISTANCE_BUTTON_MINIMUM_WIDTH, | 17 DISTANCE_BUTTON_MINIMUM_WIDTH = views::VIEWS_DISTANCE_END, |
22 // Vertical spacing between a list of multiple controls in one column. | 18 // Vertical spacing between a list of multiple controls in one column. |
23 DISTANCE_CONTROL_LIST_VERTICAL, | 19 DISTANCE_CONTROL_LIST_VERTICAL, |
24 // Margin between the edge of a dialog and the left, right, or bottom of a | 20 // Margin between the edge of a dialog and the left, right, or bottom of a |
25 // contained button. | 21 // contained button. |
26 DISTANCE_DIALOG_BUTTON_MARGIN, | 22 DISTANCE_DIALOG_BUTTON_MARGIN, |
27 // Spacing between a dialog button and the content above it. | 23 // Spacing between a dialog button and the content above it. |
28 DISTANCE_DIALOG_BUTTON_TOP, | 24 DISTANCE_DIALOG_BUTTON_TOP, |
29 // Horizontal or vertical margin between the edge of a panel and the | 25 // Horizontal or vertical margin between the edge of a panel and the |
30 // contained content. | 26 // contained content. |
31 DISTANCE_PANEL_CONTENT_MARGIN, | 27 DISTANCE_PANEL_CONTENT_MARGIN, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // types, e.g. by adding a new LayoutDistance value that means what you need. | 80 // types, e.g. by adding a new LayoutDistance value that means what you need. |
85 // | 81 // |
86 // TODO(pkasting): Fix callers and remove this. | 82 // TODO(pkasting): Fix callers and remove this. |
87 virtual bool IsHarmonyMode() const; | 83 virtual bool IsHarmonyMode() const; |
88 | 84 |
89 private: | 85 private: |
90 DISALLOW_COPY_AND_ASSIGN(ChromeLayoutProvider); | 86 DISALLOW_COPY_AND_ASSIGN(ChromeLayoutProvider); |
91 }; | 87 }; |
92 | 88 |
93 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_CHROME_LAYOUT_PROVIDER_H_ | 89 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_CHROME_LAYOUT_PROVIDER_H_ |
OLD | NEW |