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

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

Issue 2932523003: Fix Harmony popover buttons being flush with their content. (Closed)
Patch Set: too much padding for bubbles 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
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,
Peter Kasting 2017/06/10 01:51:11 I'm not sure whether adding this is right. We see
Bret 2017/06/11 00:14:09 No, lots of bubbles have buttons (e.g. the bookmar
Peter Kasting 2017/06/12 22:47:14 OK, that all makes sense. But in that case it see
Bret 2017/06/13 21:00:41 I'd really like to get everything into a working s
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 111
109 private: 112 private:
110 DefaultTypographyProvider typography_provider_; 113 DefaultTypographyProvider typography_provider_;
111 114
112 DISALLOW_COPY_AND_ASSIGN(LayoutProvider); 115 DISALLOW_COPY_AND_ASSIGN(LayoutProvider);
113 }; 116 };
114 117
115 } // namespace views 118 } // namespace views
116 119
117 #endif // UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_ 120 #endif // UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698