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

Side by Side Diff: chrome/browser/themes/theme_properties.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: Created 5 years, 4 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/themes/theme_properties.h" 5 #include "chrome/browser/themes/theme_properties.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "chrome/browser/themes/browser_theme_pack.h" 10 #include "chrome/browser/themes/browser_theme_pack.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 const int kOmniboxDropdownBorderInterior[] = {6, 0, 0}; 129 const int kOmniboxDropdownBorderInterior[] = {6, 0, 0};
130 130
131 // In an omnibox dropdown row, the minimum distance between the top and 131 // In an omnibox dropdown row, the minimum distance between the top and
132 // bottom of the row's icon and the top or bottom of the row edge. 132 // bottom of the row's icon and the top or bottom of the row edge.
133 const int kOmniboxDropdownMinIconVerticalPadding[] = {2, 4, 8}; 133 const int kOmniboxDropdownMinIconVerticalPadding[] = {2, 4, 8};
134 134
135 // In an omnibox dropdown row, the minimum distance between the top and 135 // In an omnibox dropdown row, the minimum distance between the top and
136 // bottom of the row's text and the top or bottom of the row edge. 136 // bottom of the row's text and the top or bottom of the row edge.
137 const int kOmniboxDropdownMinTextVerticalPadding[] = {3, 4, 8}; 137 const int kOmniboxDropdownMinTextVerticalPadding[] = {3, 4, 8};
138 138
139 // The font size to use in the location bar and omnibox dropdown.
140 const int kOmniboxFontPixelSize[] = {16, 14, 14};
141
139 // The spacing between a ToolbarButton's image and its border. 142 // The spacing between a ToolbarButton's image and its border.
140 const int kToolbarButtonBorderInset[] = {2, 6, 6}; 143 const int kToolbarButtonBorderInset[] = {2, 6, 6};
141 144
142 // Non-ash uses a rounded content area with no shadow in the assets. 145 // Non-ash uses a rounded content area with no shadow in the assets.
143 const int kToolbarViewContentShadowHeight[] = {0, 0, 0}; 146 const int kToolbarViewContentShadowHeight[] = {0, 0, 0};
144 147
145 // Ash doesn't use a rounded content area and its top edge has an extra shadow. 148 // Ash doesn't use a rounded content area and its top edge has an extra shadow.
146 const int kToolbarViewContentShadowHeightAsh[] = {2, 0, 0}; 149 const int kToolbarViewContentShadowHeightAsh[] = {2, 0, 0};
147 150
148 // Additional horizontal padding between the elements in the toolbar. 151 // Additional horizontal padding between the elements in the toolbar.
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 case ThemeProperties::PROPERTY_LOCATION_BAR_HORIZONTAL_PADDING: 386 case ThemeProperties::PROPERTY_LOCATION_BAR_HORIZONTAL_PADDING:
384 return kLocationBarHorizontalPadding[mode]; 387 return kLocationBarHorizontalPadding[mode];
385 case ThemeProperties::PROPERTY_LOCATION_BAR_VERTICAL_PADDING: 388 case ThemeProperties::PROPERTY_LOCATION_BAR_VERTICAL_PADDING:
386 return kLocationBarVerticalPadding[mode]; 389 return kLocationBarVerticalPadding[mode];
387 case ThemeProperties::PROPERTY_OMNIBOX_DROPDOWN_BORDER_INTERIOR: 390 case ThemeProperties::PROPERTY_OMNIBOX_DROPDOWN_BORDER_INTERIOR:
388 return kOmniboxDropdownBorderInterior[mode]; 391 return kOmniboxDropdownBorderInterior[mode];
389 case ThemeProperties::PROPERTY_OMNIBOX_DROPDOWN_MIN_ICON_VERTICAL_PADDING: 392 case ThemeProperties::PROPERTY_OMNIBOX_DROPDOWN_MIN_ICON_VERTICAL_PADDING:
390 return kOmniboxDropdownMinIconVerticalPadding[mode]; 393 return kOmniboxDropdownMinIconVerticalPadding[mode];
391 case ThemeProperties::PROPERTY_OMNIBOX_DROPDOWN_MIN_TEXT_VERTICAL_PADDING: 394 case ThemeProperties::PROPERTY_OMNIBOX_DROPDOWN_MIN_TEXT_VERTICAL_PADDING:
392 return kOmniboxDropdownMinTextVerticalPadding[mode]; 395 return kOmniboxDropdownMinTextVerticalPadding[mode];
396 case ThemeProperties::PROPERTY_OMNIBOX_FONT_PIXEL_SIZE:
397 return kOmniboxFontPixelSize[mode];
393 case ThemeProperties::PROPERTY_TOOLBAR_BUTTON_BORDER_INSET: 398 case ThemeProperties::PROPERTY_TOOLBAR_BUTTON_BORDER_INSET:
394 return kToolbarButtonBorderInset[mode]; 399 return kToolbarButtonBorderInset[mode];
395 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_CONTENT_SHADOW_HEIGHT: 400 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_CONTENT_SHADOW_HEIGHT:
396 return kToolbarViewContentShadowHeight[mode]; 401 return kToolbarViewContentShadowHeight[mode];
397 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_CONTENT_SHADOW_HEIGHT_ASH: 402 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_CONTENT_SHADOW_HEIGHT_ASH:
398 return kToolbarViewContentShadowHeightAsh[mode]; 403 return kToolbarViewContentShadowHeightAsh[mode];
399 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_ELEMENT_PADDING: 404 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_ELEMENT_PADDING:
400 return kToolbarViewElementPadding[mode]; 405 return kToolbarViewElementPadding[mode];
401 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_LEFT_EDGE_SPACING: 406 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_LEFT_EDGE_SPACING:
402 return kToolbarViewLeftEdgeSpacing[mode]; 407 return kToolbarViewLeftEdgeSpacing[mode];
403 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_LOCATION_BAR_RIGHT_PADDING: 408 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_LOCATION_BAR_RIGHT_PADDING:
404 return kToolbarViewLocationBarRightPadding[mode]; 409 return kToolbarViewLocationBarRightPadding[mode];
405 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_RIGHT_EDGE_SPACING: 410 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_RIGHT_EDGE_SPACING:
406 return kToolbarViewRightEdgeSpacing[mode]; 411 return kToolbarViewRightEdgeSpacing[mode];
407 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_STANDARD_SPACING: 412 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_STANDARD_SPACING:
408 return kToolbarViewStandardSpacing[mode]; 413 return kToolbarViewStandardSpacing[mode];
409 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_VERTICAL_PADDING: 414 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_VERTICAL_PADDING:
410 return kToolbarViewVerticalPadding[mode]; 415 return kToolbarViewVerticalPadding[mode];
411 default: 416 default:
412 return -1; 417 return -1;
413 } 418 }
414 } 419 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698