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

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

Issue 2819633002: Restored Pre-Harmony Bubble title margin metrics (Closed)
Patch Set: Fixed a typo Created 3 years, 8 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 | « no previous file | chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc » ('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 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/harmony_layout_provider.h" 5 #include "chrome/browser/ui/views/harmony/harmony_layout_provider.h"
6 6
7 gfx::Insets HarmonyLayoutProvider::GetInsetsMetric(int metric) const { 7 gfx::Insets HarmonyLayoutProvider::GetInsetsMetric(int metric) const {
8 DCHECK_LT(metric, views::VIEWS_INSETS_MAX); 8 DCHECK_LT(metric, views::VIEWS_INSETS_MAX);
9 switch (metric) { 9 switch (metric) {
10 case views::INSETS_DIALOG_BUTTON: 10 case views::INSETS_DIALOG_BUTTON:
11 case views::INSETS_PANEL: 11 case views::INSETS_PANEL:
12 case views::INSETS_BUBBLE_CONTENTS: 12 case views::INSETS_BUBBLE_CONTENTS:
13 return gfx::Insets(kHarmonyLayoutUnit); 13 return gfx::Insets(kHarmonyLayoutUnit);
14 case views::INSETS_BUBBLE_TITLE:
14 case views::INSETS_DIALOG_TITLE: { 15 case views::INSETS_DIALOG_TITLE: {
15 constexpr int top = kHarmonyLayoutUnit; 16 constexpr int top = kHarmonyLayoutUnit;
16 constexpr int side = kHarmonyLayoutUnit; 17 constexpr int side = kHarmonyLayoutUnit;
17 // Titles are inset at the top and sides, but not at the bottom. 18 // Titles are inset at the top and sides, but not at the bottom.
18 return gfx::Insets(top, side, 0, side); 19 return gfx::Insets(top, side, 0, side);
19 } 20 }
20 case views::INSETS_VECTOR_IMAGE_BUTTON: 21 case views::INSETS_VECTOR_IMAGE_BUTTON:
21 return gfx::Insets(kHarmonyLayoutUnit / 4); 22 return gfx::Insets(kHarmonyLayoutUnit / 4);
22 } 23 }
23 NOTREACHED(); 24 NOTREACHED();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 return 512; 105 return 512;
105 } 106 }
106 NOTREACHED(); 107 NOTREACHED();
107 return 0; 108 return 0;
108 } 109 }
109 110
110 const views::TypographyProvider& HarmonyLayoutProvider::GetTypographyProvider() 111 const views::TypographyProvider& HarmonyLayoutProvider::GetTypographyProvider()
111 const { 112 const {
112 return typography_provider_; 113 return typography_provider_;
113 } 114 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698