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

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

Issue 2625083003: Implement Harmony-style consistent button widths for Collected Cookies. (Closed)
Patch Set: Start on DialogClientview 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
« no previous file with comments | « chrome/browser/ui/views/harmony/layout_delegate.h ('k') | ui/views/layout/grid_layout.h » ('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 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 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 views::kCheckboxIndent; 46 return views::kCheckboxIndent;
47 case Metric::UNRELATED_CONTROL_HORIZONTAL_SPACING: 47 case Metric::UNRELATED_CONTROL_HORIZONTAL_SPACING:
48 return views::kUnrelatedControlHorizontalSpacing; 48 return views::kUnrelatedControlHorizontalSpacing;
49 case Metric::UNRELATED_CONTROL_HORIZONTAL_SPACING_LARGE: 49 case Metric::UNRELATED_CONTROL_HORIZONTAL_SPACING_LARGE:
50 return views::kUnrelatedControlLargeHorizontalSpacing; 50 return views::kUnrelatedControlLargeHorizontalSpacing;
51 case Metric::UNRELATED_CONTROL_VERTICAL_SPACING: 51 case Metric::UNRELATED_CONTROL_VERTICAL_SPACING:
52 return views::kUnrelatedControlVerticalSpacing; 52 return views::kUnrelatedControlVerticalSpacing;
53 case Metric::UNRELATED_CONTROL_VERTICAL_SPACING_LARGE: 53 case Metric::UNRELATED_CONTROL_VERTICAL_SPACING_LARGE:
54 return views::kUnrelatedControlLargeVerticalSpacing; 54 return views::kUnrelatedControlLargeVerticalSpacing;
55 case Metric::BUTTON_MAX_SHARED_WIDTH:
56 return 0; // Buttons never expand during layout (add padding instead).
55 } 57 }
56 NOTREACHED(); 58 NOTREACHED();
57 return 0; 59 return 0;
58 } 60 }
59 61
60 views::GridLayout::Alignment LayoutDelegate::GetControlLabelGridAlignment() 62 views::GridLayout::Alignment LayoutDelegate::GetControlLabelGridAlignment()
61 const { 63 const {
62 return views::GridLayout::TRAILING; 64 return views::GridLayout::TRAILING;
63 } 65 }
64 66
65 bool LayoutDelegate::UseExtraDialogPadding() const { 67 bool LayoutDelegate::UseExtraDialogPadding() const {
66 return true; 68 return true;
67 } 69 }
68 70
69 bool LayoutDelegate::IsHarmonyMode() const { 71 bool LayoutDelegate::IsHarmonyMode() const {
70 return false; 72 return false;
71 } 73 }
72 74
73 int LayoutDelegate::GetDialogPreferredWidth(DialogWidth width) const { 75 int LayoutDelegate::GetDialogPreferredWidth(DialogWidth width) const {
74 return 0; 76 return 0;
75 } 77 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/harmony/layout_delegate.h ('k') | ui/views/layout/grid_layout.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698