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

Side by Side Diff: chrome/browser/ui/views/layout_constants.cc

Issue 1306173002: Set font size to 14 in location bar for material design (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: padding Created 5 years, 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/layout_constants.h" 5 #include "chrome/browser/ui/views/layout_constants.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/base/resource/material_design/material_design_controller.h" 8 #include "ui/base/resource/material_design/material_design_controller.h"
9 9
10 int GetLayoutConstant(LayoutConstant constant) { 10 int GetLayoutConstant(LayoutConstant constant) {
11 const int kIconLabelViewTrailingPadding[] = {2, 8, 8}; 11 const int kIconLabelViewTrailingPadding[] = {2, 8, 8};
12 const int kLocationBarBubbleHorizontalPadding[] = {1, 5, 5}; 12 const int kLocationBarBubbleHorizontalPadding[] = {1, 5, 5};
13 const int kLocationBarBubbleVerticalPadding[] = {1, 3, 3}; 13 const int kLocationBarBubbleVerticalPadding[] = {1, 3, 3};
14 const int kLocationBarHeight[] = {0, 28, 32}; 14 const int kLocationBarHeight[] = {0, 28, 32};
15 const int kLocationBarHorizontalPadding[] = {3, 6, 6}; 15 const int kLocationBarHorizontalPadding[] = {3, 6, 6};
16 const int kLocationBarVerticalPadding[] = {2, 6, 6}; 16 const int kLocationBarVerticalPadding[] = {2, 2, 2};
Peter Kasting 2015/09/16 23:22:11 You didn't make this change in old versions of thi
tdanderson 2015/09/18 14:23:47 Yes, this is an intentional change. Changed the CL
17 const int kOmniboxDropdownBorderInterior[] = {6, 0, 0}; 17 const int kOmniboxDropdownBorderInterior[] = {6, 0, 0};
18 const int kOmniboxFontPixelSize[] = {16, 14, 14};
18 const int kToolbarViewContentShadowHeight[] = {0, 0, 0}; 19 const int kToolbarViewContentShadowHeight[] = {0, 0, 0};
19 const int kToolbarViewContentShadowHeightAsh[] = {2, 0, 0}; 20 const int kToolbarViewContentShadowHeightAsh[] = {2, 0, 0};
20 const int kToolbarViewElementPadding[] = {0, 0, 8}; 21 const int kToolbarViewElementPadding[] = {0, 0, 8};
21 const int kToolbarViewLocationBarRightPadding[] = {0, 4, 8}; 22 const int kToolbarViewLocationBarRightPadding[] = {0, 4, 8};
22 const int kToolbarViewStandardSpacing[] = {3, 4, 8}; 23 const int kToolbarViewStandardSpacing[] = {3, 4, 8};
23 24
24 const int mode = ui::MaterialDesignController::GetMode(); 25 const int mode = ui::MaterialDesignController::GetMode();
25 switch (constant) { 26 switch (constant) {
26 case ICON_LABEL_VIEW_TRAILING_PADDING: 27 case ICON_LABEL_VIEW_TRAILING_PADDING:
27 return kIconLabelViewTrailingPadding[mode]; 28 return kIconLabelViewTrailingPadding[mode];
28 case LOCATION_BAR_BUBBLE_HORIZONTAL_PADDING: 29 case LOCATION_BAR_BUBBLE_HORIZONTAL_PADDING:
29 return kLocationBarBubbleHorizontalPadding[mode]; 30 return kLocationBarBubbleHorizontalPadding[mode];
30 case LOCATION_BAR_BUBBLE_VERTICAL_PADDING: 31 case LOCATION_BAR_BUBBLE_VERTICAL_PADDING:
31 return kLocationBarBubbleVerticalPadding[mode]; 32 return kLocationBarBubbleVerticalPadding[mode];
32 case LOCATION_BAR_HEIGHT: 33 case LOCATION_BAR_HEIGHT:
33 return kLocationBarHeight[mode]; 34 return kLocationBarHeight[mode];
34 case LOCATION_BAR_HORIZONTAL_PADDING: 35 case LOCATION_BAR_HORIZONTAL_PADDING:
35 return kLocationBarHorizontalPadding[mode]; 36 return kLocationBarHorizontalPadding[mode];
36 case LOCATION_BAR_VERTICAL_PADDING: 37 case LOCATION_BAR_VERTICAL_PADDING:
37 return kLocationBarVerticalPadding[mode]; 38 return kLocationBarVerticalPadding[mode];
38 case OMNIBOX_DROPDOWN_BORDER_INTERIOR: 39 case OMNIBOX_DROPDOWN_BORDER_INTERIOR:
39 return kOmniboxDropdownBorderInterior[mode]; 40 return kOmniboxDropdownBorderInterior[mode];
41 case OMNIBOX_FONT_PIXEL_SIZE:
42 return kOmniboxFontPixelSize[mode];
40 case TOOLBAR_VIEW_CONTENT_SHADOW_HEIGHT: 43 case TOOLBAR_VIEW_CONTENT_SHADOW_HEIGHT:
41 return kToolbarViewContentShadowHeight[mode]; 44 return kToolbarViewContentShadowHeight[mode];
42 case TOOLBAR_VIEW_CONTENT_SHADOW_HEIGHT_ASH: 45 case TOOLBAR_VIEW_CONTENT_SHADOW_HEIGHT_ASH:
43 return kToolbarViewContentShadowHeightAsh[mode]; 46 return kToolbarViewContentShadowHeightAsh[mode];
44 case TOOLBAR_VIEW_ELEMENT_PADDING: 47 case TOOLBAR_VIEW_ELEMENT_PADDING:
45 return kToolbarViewElementPadding[mode]; 48 return kToolbarViewElementPadding[mode];
46 case TOOLBAR_VIEW_LOCATION_BAR_RIGHT_PADDING: 49 case TOOLBAR_VIEW_LOCATION_BAR_RIGHT_PADDING:
47 return kToolbarViewLocationBarRightPadding[mode]; 50 return kToolbarViewLocationBarRightPadding[mode];
48 case TOOLBAR_VIEW_STANDARD_SPACING: 51 case TOOLBAR_VIEW_STANDARD_SPACING:
49 return kToolbarViewStandardSpacing[mode]; 52 return kToolbarViewStandardSpacing[mode];
(...skipping 27 matching lines...) Expand all
77 } 80 }
78 case TOOLBAR_VIEW: 81 case TOOLBAR_VIEW:
79 return gfx::Insets(kToolbarViewTopVerticalPadding[mode], 82 return gfx::Insets(kToolbarViewTopVerticalPadding[mode],
80 kToolbarViewLeftEdgeSpacing[mode], 83 kToolbarViewLeftEdgeSpacing[mode],
81 kToolbarViewBottomVerticalPadding[mode], 84 kToolbarViewBottomVerticalPadding[mode],
82 kToolbarViewRightEdgeSpacing[mode]); 85 kToolbarViewRightEdgeSpacing[mode]);
83 } 86 }
84 NOTREACHED(); 87 NOTREACHED();
85 return gfx::Insets(); 88 return gfx::Insets();
86 } 89 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/layout_constants.h ('k') | chrome/browser/ui/views/location_bar/location_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698