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