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

Unified Diff: ui/views/layout/layout_provider.cc

Issue 2860953002: Harmony: Apply the upper bound on equal-sized button widths in DialogClientView. (Closed)
Patch Set: test_layout_provider.h, sanity checks, self-review: nit data member names Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/layout/layout_provider.h ('k') | ui/views/test/test_layout_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/layout/layout_provider.cc
diff --git a/ui/views/layout/layout_provider.cc b/ui/views/layout/layout_provider.cc
index 3cb034c5463d1e2b45a3d9aa931c88389c55519d..5d2f86b27275d9ad23517a31d4c472d3aeb8dc93 100644
--- a/ui/views/layout/layout_provider.cc
+++ b/ui/views/layout/layout_provider.cc
@@ -56,6 +56,10 @@ gfx::Insets LayoutProvider::GetInsetsMetric(int metric) const {
int LayoutProvider::GetDistanceMetric(int metric) const {
DCHECK_GE(metric, VIEWS_INSETS_MAX);
switch (metric) {
+ case DistanceMetric::DISTANCE_BUTTON_HORIZONTAL_PADDING:
+ return kButtonHorizontalPadding;
+ case DistanceMetric::DISTANCE_BUTTON_MAX_LINKABLE_WIDTH:
+ return 0;
case DistanceMetric::DISTANCE_CLOSE_BUTTON_MARGIN:
return kCloseButtonMargin;
case DistanceMetric::DISTANCE_RELATED_BUTTON_HORIZONTAL:
@@ -66,8 +70,6 @@ int LayoutProvider::GetDistanceMetric(int metric) const {
return kRelatedControlVerticalSpacing;
case DistanceMetric::DISTANCE_DIALOG_BUTTON_MINIMUM_WIDTH:
return kDialogMinimumButtonWidth;
- case DistanceMetric::DISTANCE_BUTTON_HORIZONTAL_PADDING:
- return kButtonHorizontalPadding;
}
NOTREACHED();
return 0;
« no previous file with comments | « ui/views/layout/layout_provider.h ('k') | ui/views/test/test_layout_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698