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

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

Issue 2968713003: Harmonize the find in page dialog. (Closed)
Patch Set: Added distance metrics for toast button/label/text. Using these in the find bar. Created 3 years, 5 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 #include "chrome/browser/ui/views/harmony/chrome_layout_provider.h" 5 #include "chrome/browser/ui/views/harmony/chrome_layout_provider.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "chrome/browser/ui/views/harmony/chrome_typography.h" 9 #include "chrome/browser/ui/views/harmony/chrome_typography.h"
10 #include "chrome/browser/ui/views/harmony/harmony_layout_provider.h" 10 #include "chrome/browser/ui/views/harmony/harmony_layout_provider.h"
(...skipping 27 matching lines...) Expand all
38 case DISTANCE_RELATED_LABEL_HORIZONTAL_LIST: 38 case DISTANCE_RELATED_LABEL_HORIZONTAL_LIST:
39 return 8; 39 return 8;
40 case DISTANCE_SUBSECTION_HORIZONTAL_INDENT: 40 case DISTANCE_SUBSECTION_HORIZONTAL_INDENT:
41 return 10; 41 return 10;
42 case DISTANCE_UNRELATED_CONTROL_HORIZONTAL: 42 case DISTANCE_UNRELATED_CONTROL_HORIZONTAL:
43 return 12; 43 return 12;
44 case DISTANCE_UNRELATED_CONTROL_HORIZONTAL_LARGE: 44 case DISTANCE_UNRELATED_CONTROL_HORIZONTAL_LARGE:
45 return 20; 45 return 20;
46 case DISTANCE_UNRELATED_CONTROL_VERTICAL_LARGE: 46 case DISTANCE_UNRELATED_CONTROL_VERTICAL_LARGE:
47 return 30; 47 return 30;
48 case DISTANCE_TOAST_BUTTON_VERTICAL:
49 return 8;
50 case DISTANCE_TOAST_TEXT_VERTICAL:
51 return 8;
52 case DISTANCE_TOAST_LABEL_VERTICAL:
53 return 12;
48 default: 54 default:
49 return views::LayoutProvider::GetDistanceMetric(metric); 55 return views::LayoutProvider::GetDistanceMetric(metric);
50 } 56 }
51 } 57 }
52 58
53 const views::TypographyProvider& ChromeLayoutProvider::GetTypographyProvider() 59 const views::TypographyProvider& ChromeLayoutProvider::GetTypographyProvider()
54 const { 60 const {
55 // This is not a data member because then HarmonyLayoutProvider would inherit 61 // This is not a data member because then HarmonyLayoutProvider would inherit
56 // it, even when it provides its own. 62 // it, even when it provides its own.
57 CR_DEFINE_STATIC_LOCAL(LegacyTypographyProvider, legacy_provider, ()); 63 CR_DEFINE_STATIC_LOCAL(LegacyTypographyProvider, legacy_provider, ());
58 return legacy_provider; 64 return legacy_provider;
59 } 65 }
60 66
61 views::GridLayout::Alignment 67 views::GridLayout::Alignment
62 ChromeLayoutProvider::GetControlLabelGridAlignment() const { 68 ChromeLayoutProvider::GetControlLabelGridAlignment() const {
63 return views::GridLayout::TRAILING; 69 return views::GridLayout::TRAILING;
64 } 70 }
65 71
66 bool ChromeLayoutProvider::UseExtraDialogPadding() const { 72 bool ChromeLayoutProvider::UseExtraDialogPadding() const {
67 return true; 73 return true;
68 } 74 }
69 75
70 bool ChromeLayoutProvider::ShouldShowWindowIcon() const { 76 bool ChromeLayoutProvider::ShouldShowWindowIcon() const {
71 return true; 77 return true;
72 } 78 }
73 79
74 bool ChromeLayoutProvider::IsHarmonyMode() const { 80 bool ChromeLayoutProvider::IsHarmonyMode() const {
75 return false; 81 return false;
76 } 82 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698