OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_ | 5 #ifndef UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_ |
6 #define UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_ | 6 #define UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "ui/gfx/geometry/insets.h" | 9 #include "ui/gfx/geometry/insets.h" |
10 #include "ui/views/style/typography_provider.h" | 10 #include "ui/views/style/typography_provider.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 }; | 41 }; |
42 | 42 |
43 enum DistanceMetric { | 43 enum DistanceMetric { |
44 // DistanceMetric enum values must always be greater than any InsetsMetric | 44 // DistanceMetric enum values must always be greater than any InsetsMetric |
45 // value. This allows the code to verify at runtime that arguments of the | 45 // value. This allows the code to verify at runtime that arguments of the |
46 // two types have not been interchanged. | 46 // two types have not been interchanged. |
47 VIEWS_DISTANCE_START = VIEWS_INSETS_MAX, | 47 VIEWS_DISTANCE_START = VIEWS_INSETS_MAX, |
48 | 48 |
49 // The default padding to add on each side of a button's label. | 49 // The default padding to add on each side of a button's label. |
50 DISTANCE_BUTTON_HORIZONTAL_PADDING = VIEWS_DISTANCE_START, | 50 DISTANCE_BUTTON_HORIZONTAL_PADDING = VIEWS_DISTANCE_START, |
| 51 // The maximum width a button can have and still influence the sizes of |
| 52 // other linked buttons. This allows short buttons to have linked widths |
| 53 // without long buttons making things overly wide. |
| 54 DISTANCE_BUTTON_MAX_LINKABLE_WIDTH, |
51 // The distance between a dialog's edge and the close button in the upper | 55 // The distance between a dialog's edge and the close button in the upper |
52 // trailing corner. | 56 // trailing corner. |
53 DISTANCE_CLOSE_BUTTON_MARGIN, | 57 DISTANCE_CLOSE_BUTTON_MARGIN, |
54 // The default minimum width of a dialog button. | 58 // The default minimum width of a dialog button. |
55 DISTANCE_DIALOG_BUTTON_MINIMUM_WIDTH, | 59 DISTANCE_DIALOG_BUTTON_MINIMUM_WIDTH, |
56 // The spacing between a pair of related horizontal buttons, used for | 60 // The spacing between a pair of related horizontal buttons, used for |
57 // dialog layout. | 61 // dialog layout. |
58 DISTANCE_RELATED_BUTTON_HORIZONTAL, | 62 DISTANCE_RELATED_BUTTON_HORIZONTAL, |
59 // Horizontal spacing between controls that are logically related. | 63 // Horizontal spacing between controls that are logically related. |
60 DISTANCE_RELATED_CONTROL_HORIZONTAL, | 64 DISTANCE_RELATED_CONTROL_HORIZONTAL, |
(...skipping 30 matching lines...) Expand all Loading... |
91 | 95 |
92 private: | 96 private: |
93 DefaultTypographyProvider typography_provider_; | 97 DefaultTypographyProvider typography_provider_; |
94 | 98 |
95 DISALLOW_COPY_AND_ASSIGN(LayoutProvider); | 99 DISALLOW_COPY_AND_ASSIGN(LayoutProvider); |
96 }; | 100 }; |
97 | 101 |
98 } // namespace views | 102 } // namespace views |
99 | 103 |
100 #endif // UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_ | 104 #endif // UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_ |
OLD | NEW |