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

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

Issue 2753243002: Views/Harmony: Replace layout constants in chrome/browser/ui/views/extensions. (Closed)
Patch Set: Review comments. 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>::DestructorAtExit 10 static base::LazyInstance<HarmonyLayoutDelegate>::DestructorAtExit
(...skipping 22 matching lines...) Expand all
33 case Metric::DIALOG_CLOSE_BUTTON_MARGIN: 33 case Metric::DIALOG_CLOSE_BUTTON_MARGIN:
34 // TODO(pkasting): The "- 4" here is a hack that matches the extra padding 34 // TODO(pkasting): The "- 4" here is a hack that matches the extra padding
35 // in vector_icon_button.cc and should be removed when that padding is. 35 // in vector_icon_button.cc and should be removed when that padding is.
36 return (kHarmonyLayoutUnit / 2) - 4; 36 return (kHarmonyLayoutUnit / 2) - 4;
37 case Metric::PANEL_CONTENT_MARGIN: 37 case Metric::PANEL_CONTENT_MARGIN:
38 return kHarmonyLayoutUnit; 38 return kHarmonyLayoutUnit;
39 case Metric::RELATED_BUTTON_HORIZONTAL_SPACING: 39 case Metric::RELATED_BUTTON_HORIZONTAL_SPACING:
40 return kHarmonyLayoutUnit / 2; 40 return kHarmonyLayoutUnit / 2;
41 case Metric::RELATED_CONTROL_HORIZONTAL_SPACING: 41 case Metric::RELATED_CONTROL_HORIZONTAL_SPACING:
42 return kHarmonyLayoutUnit; 42 return kHarmonyLayoutUnit;
43 case Metric::RELATED_CONTROL_HORIZONTAL_SPACING_SMALL:
44 return kHarmonyLayoutUnit;
43 case Metric::RELATED_CONTROL_VERTICAL_SPACING: 45 case Metric::RELATED_CONTROL_VERTICAL_SPACING:
44 return kHarmonyLayoutUnit / 2; 46 return kHarmonyLayoutUnit / 2;
47 case Metric::RELATED_CONTROL_VERTICAL_SPACING_SMALL:
48 return kHarmonyLayoutUnit / 2;
45 case Metric::RELATED_LABEL_HORIZONTAL_SPACING: 49 case Metric::RELATED_LABEL_HORIZONTAL_SPACING:
46 return kHarmonyLayoutUnit; 50 return kHarmonyLayoutUnit;
47 case Metric::SUBSECTION_HORIZONTAL_INDENT: 51 case Metric::SUBSECTION_HORIZONTAL_INDENT:
48 return 0; 52 return 0;
49 case Metric::UNRELATED_CONTROL_HORIZONTAL_SPACING: 53 case Metric::UNRELATED_CONTROL_HORIZONTAL_SPACING:
50 return kHarmonyLayoutUnit; 54 return kHarmonyLayoutUnit;
51 case Metric::UNRELATED_CONTROL_HORIZONTAL_SPACING_LARGE: 55 case Metric::UNRELATED_CONTROL_HORIZONTAL_SPACING_LARGE:
52 return kHarmonyLayoutUnit; 56 return kHarmonyLayoutUnit;
53 case Metric::UNRELATED_CONTROL_VERTICAL_SPACING: 57 case Metric::UNRELATED_CONTROL_VERTICAL_SPACING:
54 return kHarmonyLayoutUnit; 58 return kHarmonyLayoutUnit;
(...skipping 26 matching lines...) Expand all
81 case DialogWidth::SMALL: 85 case DialogWidth::SMALL:
82 return 320; 86 return 320;
83 case DialogWidth::MEDIUM: 87 case DialogWidth::MEDIUM:
84 return 448; 88 return 448;
85 case DialogWidth::LARGE: 89 case DialogWidth::LARGE:
86 return 512; 90 return 512;
87 } 91 }
88 NOTREACHED(); 92 NOTREACHED();
89 return 0; 93 return 0;
90 } 94 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/media_gallery_checkbox_view.cc ('k') | chrome/browser/ui/views/harmony/layout_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698