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

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

Issue 2696263002: Refactor ViewsDelegate and MD-ify the icon-to-text spacing for checkbox and radiobutton (Closed)
Patch Set: Reduced ViewsDelegate layout/metric functions to only two functions Created 3 years, 10 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/layout_delegate.h" 5 #include "chrome/browser/ui/views/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 #include "chrome/browser/ui/views/harmony/harmony_layout_delegate.h" 9 #include "chrome/browser/ui/views/harmony/harmony_layout_delegate.h"
10 #include "ui/base/material_design/material_design_controller.h" 10 #include "ui/base/material_design/material_design_controller.h"
(...skipping 26 matching lines...) Expand all
37 case Metric::RELATED_CONTROL_VERTICAL_SPACING: 37 case Metric::RELATED_CONTROL_VERTICAL_SPACING:
38 return views::kRelatedControlVerticalSpacing; 38 return views::kRelatedControlVerticalSpacing;
39 case Metric::RELATED_LABEL_HORIZONTAL_SPACING: 39 case Metric::RELATED_LABEL_HORIZONTAL_SPACING:
40 return views::kItemLabelSpacing; 40 return views::kItemLabelSpacing;
41 case Metric::SUBSECTION_HORIZONTAL_INDENT: 41 case Metric::SUBSECTION_HORIZONTAL_INDENT:
42 return views::kCheckboxIndent; 42 return views::kCheckboxIndent;
43 case Metric::UNRELATED_CONTROL_VERTICAL_SPACING: 43 case Metric::UNRELATED_CONTROL_VERTICAL_SPACING:
44 return views::kUnrelatedControlVerticalSpacing; 44 return views::kUnrelatedControlVerticalSpacing;
45 case Metric::UNRELATED_CONTROL_VERTICAL_SPACING_LARGE: 45 case Metric::UNRELATED_CONTROL_VERTICAL_SPACING_LARGE:
46 return views::kUnrelatedControlLargeVerticalSpacing; 46 return views::kUnrelatedControlLargeVerticalSpacing;
47 case Metric::ICON_TEXT_SPACING:
48 return views::kIconTextSpacing;
47 } 49 }
48 NOTREACHED(); 50 NOTREACHED();
49 return 0; 51 return 0;
50 } 52 }
51 53
52 views::GridLayout::Alignment LayoutDelegate::GetControlLabelGridAlignment() 54 views::GridLayout::Alignment LayoutDelegate::GetControlLabelGridAlignment()
53 const { 55 const {
54 return views::GridLayout::TRAILING; 56 return views::GridLayout::TRAILING;
55 } 57 }
56 58
57 bool LayoutDelegate::UseExtraDialogPadding() const { 59 bool LayoutDelegate::UseExtraDialogPadding() const {
58 return true; 60 return true;
59 } 61 }
60 62
61 bool LayoutDelegate::IsHarmonyMode() const { 63 bool LayoutDelegate::IsHarmonyMode() const {
62 return false; 64 return false;
63 } 65 }
64 66
65 int LayoutDelegate::GetDialogPreferredWidth(DialogWidth width) const { 67 int LayoutDelegate::GetDialogPreferredWidth(DialogWidth width) const {
66 return 0; 68 return 0;
67 } 69 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698