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

Side by Side Diff: chrome/browser/themes/theme_properties.cc

Issue 1322323006: Change toolbar height for material design on Ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 (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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 const int kToolbarViewLocationBarRightPadding[] = {0, 4, 8}; 164 const int kToolbarViewLocationBarRightPadding[] = {0, 4, 8};
165 165
166 // The edge graphics have some built-in spacing/shadowing, so we have to adjust 166 // The edge graphics have some built-in spacing/shadowing, so we have to adjust
167 // our spacing to make it match. 167 // our spacing to make it match.
168 const int kToolbarViewLeftEdgeSpacing[] = {3, 4, 8}; 168 const int kToolbarViewLeftEdgeSpacing[] = {3, 4, 8};
169 const int kToolbarViewRightEdgeSpacing[] = {2, 4, 8}; 169 const int kToolbarViewRightEdgeSpacing[] = {2, 4, 8};
170 170
171 // The horizontal space between most items. 171 // The horizontal space between most items.
172 const int kToolbarViewStandardSpacing[] = {3, 4, 8}; 172 const int kToolbarViewStandardSpacing[] = {3, 4, 8};
173 173
174 // The minimal vertical padding of the toolbar. 174 // The minimum bottom and top vertical padding of the toolbar.
175 const int kToolbarViewVerticalPadding[] = {5, 4, 4}; 175 const int kToolbarViewBottomVerticalPadding[] = {5, 5, 5};
176 const int kToolbarViewTopVerticalPadding[] = {5, 4, 4};
176 177
177 // ---------------------------------------------------------------------------- 178 // ----------------------------------------------------------------------------
178 179
179 // Strings used in alignment properties. 180 // Strings used in alignment properties.
180 const char kAlignmentCenter[] = "center"; 181 const char kAlignmentCenter[] = "center";
181 const char kAlignmentTop[] = "top"; 182 const char kAlignmentTop[] = "top";
182 const char kAlignmentBottom[] = "bottom"; 183 const char kAlignmentBottom[] = "bottom";
183 const char kAlignmentLeft[] = "left"; 184 const char kAlignmentLeft[] = "left";
184 const char kAlignmentRight[] = "right"; 185 const char kAlignmentRight[] = "right";
185 186
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_ELEMENT_PADDING: 429 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_ELEMENT_PADDING:
429 return kToolbarViewElementPadding[mode]; 430 return kToolbarViewElementPadding[mode];
430 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_LEFT_EDGE_SPACING: 431 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_LEFT_EDGE_SPACING:
431 return kToolbarViewLeftEdgeSpacing[mode]; 432 return kToolbarViewLeftEdgeSpacing[mode];
432 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_LOCATION_BAR_RIGHT_PADDING: 433 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_LOCATION_BAR_RIGHT_PADDING:
433 return kToolbarViewLocationBarRightPadding[mode]; 434 return kToolbarViewLocationBarRightPadding[mode];
434 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_RIGHT_EDGE_SPACING: 435 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_RIGHT_EDGE_SPACING:
435 return kToolbarViewRightEdgeSpacing[mode]; 436 return kToolbarViewRightEdgeSpacing[mode];
436 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_STANDARD_SPACING: 437 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_STANDARD_SPACING:
437 return kToolbarViewStandardSpacing[mode]; 438 return kToolbarViewStandardSpacing[mode];
438 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_VERTICAL_PADDING: 439 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_BOTTOM_VERTICAL_PADDING:
439 return kToolbarViewVerticalPadding[mode]; 440 return kToolbarViewBottomVerticalPadding[mode];
441 case ThemeProperties::PROPERTY_TOOLBAR_VIEW_TOP_VERTICAL_PADDING:
442 return kToolbarViewTopVerticalPadding[mode];
440 default: 443 default:
441 return -1; 444 return -1;
442 } 445 }
443 } 446 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698