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

Side by Side Diff: chrome/browser/ui/views/harmony/harmony_layout_delegate.cc

Issue 2696263002: Refactor ViewsDelegate and MD-ify the icon-to-text spacing for checkbox and radiobutton (Closed)
Patch Set: Fix unit tests to use a ViewsDelegate to guard against crashes Created 3 years, 9 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 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 #include "chrome/browser/ui/views/harmony/harmony_layout_delegate.h" 5 #include "chrome/browser/ui/views/harmony/harmony_layout_delegate.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 9
10 static base::LazyInstance<HarmonyLayoutDelegate> harmony_layout_delegate_ = 10 static base::LazyInstance<HarmonyLayoutDelegate> harmony_layout_delegate_ =
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 case Metric::SUBSECTION_HORIZONTAL_INDENT: 45 case Metric::SUBSECTION_HORIZONTAL_INDENT:
46 return 0; 46 return 0;
47 case Metric::UNRELATED_CONTROL_HORIZONTAL_SPACING: 47 case Metric::UNRELATED_CONTROL_HORIZONTAL_SPACING:
48 return kHarmonyLayoutUnit; 48 return kHarmonyLayoutUnit;
49 case Metric::UNRELATED_CONTROL_HORIZONTAL_SPACING_LARGE: 49 case Metric::UNRELATED_CONTROL_HORIZONTAL_SPACING_LARGE:
50 return kHarmonyLayoutUnit; 50 return kHarmonyLayoutUnit;
51 case Metric::UNRELATED_CONTROL_VERTICAL_SPACING: 51 case Metric::UNRELATED_CONTROL_VERTICAL_SPACING:
52 return kHarmonyLayoutUnit; 52 return kHarmonyLayoutUnit;
53 case Metric::UNRELATED_CONTROL_VERTICAL_SPACING_LARGE: 53 case Metric::UNRELATED_CONTROL_VERTICAL_SPACING_LARGE:
54 return kHarmonyLayoutUnit; 54 return kHarmonyLayoutUnit;
55 case Metric::ICON_TEXT_SPACING:
56 return kHarmonyLayoutUnit;
55 } 57 }
56 NOTREACHED(); 58 NOTREACHED();
57 return 0; 59 return 0;
58 } 60 }
59 61
60 views::GridLayout::Alignment 62 views::GridLayout::Alignment
61 HarmonyLayoutDelegate::GetControlLabelGridAlignment() const { 63 HarmonyLayoutDelegate::GetControlLabelGridAlignment() const {
62 return views::GridLayout::LEADING; 64 return views::GridLayout::LEADING;
63 } 65 }
64 66
(...skipping 10 matching lines...) Expand all
75 case DialogWidth::SMALL: 77 case DialogWidth::SMALL:
76 return 320; 78 return 320;
77 case DialogWidth::MEDIUM: 79 case DialogWidth::MEDIUM:
78 return 448; 80 return 448;
79 case DialogWidth::LARGE: 81 case DialogWidth::LARGE:
80 return 512; 82 return 512;
81 } 83 }
82 NOTREACHED(); 84 NOTREACHED();
83 return 0; 85 return 0;
84 } 86 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698