Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: ui/views/layout/layout_provider.h

Issue 2932523003: Fix Harmony popover buttons being flush with their content. (Closed)
Patch Set: fix merge Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/bubble/bubble_dialog_delegate.cc ('k') | ui/views/layout/layout_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // All Insets enum values must be below this value. 42 // All Insets enum values must be below this value.
43 VIEWS_INSETS_MAX = 0x1000 43 VIEWS_INSETS_MAX = 0x1000
44 }; 44 };
45 45
46 enum DistanceMetric { 46 enum DistanceMetric {
47 // DistanceMetric enum values must always be greater than any InsetsMetric 47 // DistanceMetric enum values must always be greater than any InsetsMetric
48 // value. This allows the code to verify at runtime that arguments of the 48 // value. This allows the code to verify at runtime that arguments of the
49 // two types have not been interchanged. 49 // two types have not been interchanged.
50 VIEWS_DISTANCE_START = VIEWS_INSETS_MAX, 50 VIEWS_DISTANCE_START = VIEWS_INSETS_MAX,
51 51
52 // If a bubble has buttons, this is the margin between them and the rest of
53 // the content.
54 DISTANCE_BUBBLE_BUTTON_TOP_MARGIN = VIEWS_DISTANCE_START,
52 // Margin on the left and right of the contents of a bubble. 55 // Margin on the left and right of the contents of a bubble.
53 DISTANCE_BUBBLE_CONTENTS_HORIZONTAL_MARGIN = VIEWS_DISTANCE_START, 56 DISTANCE_BUBBLE_CONTENTS_HORIZONTAL_MARGIN,
54 // Margin on the top and bottom of the contents of a bubble. 57 // Margin on the top and bottom of the contents of a bubble.
55 DISTANCE_BUBBLE_CONTENTS_VERTICAL_MARGIN, 58 DISTANCE_BUBBLE_CONTENTS_VERTICAL_MARGIN,
56 // The default padding to add on each side of a button's label. 59 // The default padding to add on each side of a button's label.
57 DISTANCE_BUTTON_HORIZONTAL_PADDING, 60 DISTANCE_BUTTON_HORIZONTAL_PADDING,
58 // The maximum width a button can have and still influence the sizes of 61 // The maximum width a button can have and still influence the sizes of
59 // other linked buttons. This allows short buttons to have linked widths 62 // other linked buttons. This allows short buttons to have linked widths
60 // without long buttons making things overly wide. 63 // without long buttons making things overly wide.
61 DISTANCE_BUTTON_MAX_LINKABLE_WIDTH, 64 DISTANCE_BUTTON_MAX_LINKABLE_WIDTH,
62 // The distance between a dialog's edge and the close button in the upper 65 // The distance between a dialog's edge and the close button in the upper
63 // trailing corner. 66 // trailing corner.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 113
111 private: 114 private:
112 DefaultTypographyProvider typography_provider_; 115 DefaultTypographyProvider typography_provider_;
113 116
114 DISALLOW_COPY_AND_ASSIGN(LayoutProvider); 117 DISALLOW_COPY_AND_ASSIGN(LayoutProvider);
115 }; 118 };
116 119
117 } // namespace views 120 } // namespace views
118 121
119 #endif // UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_ 122 #endif // UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_dialog_delegate.cc ('k') | ui/views/layout/layout_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698