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

Side by Side Diff: ui/native_theme/common_theme.cc

Issue 2575343005: Native themes: Add MenuItemSubtitleColor (Closed)
Patch Set: Created 4 years 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/native_theme/common_theme.h" 5 #include "ui/native_theme/common_theme.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "third_party/skia/include/core/SkCanvas.h" 9 #include "third_party/skia/include/core/SkCanvas.h"
10 #include "ui/base/material_design/material_design_controller.h" 10 #include "ui/base/material_design/material_design_controller.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 case NativeTheme::kColorId_MenuSeparatorColor: 176 case NativeTheme::kColorId_MenuSeparatorColor:
177 return kMenuSeparatorColor; 177 return kMenuSeparatorColor;
178 case NativeTheme::kColorId_MenuBackgroundColor: 178 case NativeTheme::kColorId_MenuBackgroundColor:
179 return kMenuBackgroundColor; 179 return kMenuBackgroundColor;
180 case NativeTheme::kColorId_FocusedMenuItemBackgroundColor: 180 case NativeTheme::kColorId_FocusedMenuItemBackgroundColor:
181 return kMenuHighlightBackgroundColor; 181 return kMenuHighlightBackgroundColor;
182 case NativeTheme::kColorId_EnabledMenuItemForegroundColor: 182 case NativeTheme::kColorId_EnabledMenuItemForegroundColor:
183 return kEnabledMenuItemForegroundColor; 183 return kEnabledMenuItemForegroundColor;
184 case NativeTheme::kColorId_DisabledMenuItemForegroundColor: 184 case NativeTheme::kColorId_DisabledMenuItemForegroundColor:
185 return kDisabledMenuItemForegroundColor; 185 return kDisabledMenuItemForegroundColor;
186 case NativeTheme::kColorId_MenuItemSubtitleColor:
187 return kDisabledMenuItemForegroundColor;
Evan Stade 2016/12/20 00:39:22 if you make this return base_theme->GetSystemColo
Tom (Use chromium acct) 2016/12/20 01:03:19 Done.
186 188
187 // Label 189 // Label
188 case NativeTheme::kColorId_LabelEnabledColor: 190 case NativeTheme::kColorId_LabelEnabledColor:
189 return kButtonEnabledColor; 191 return kButtonEnabledColor;
190 case NativeTheme::kColorId_LabelDisabledColor: 192 case NativeTheme::kColorId_LabelDisabledColor:
191 return base_theme->GetSystemColor( 193 return base_theme->GetSystemColor(
192 NativeTheme::kColorId_ButtonDisabledColor); 194 NativeTheme::kColorId_ButtonDisabledColor);
193 case NativeTheme::kColorId_LabelTextSelectionColor: 195 case NativeTheme::kColorId_LabelTextSelectionColor:
194 return kTextSelectionColor; 196 return kTextSelectionColor;
195 case NativeTheme::kColorId_LabelTextSelectionBackgroundFocused: 197 case NativeTheme::kColorId_LabelTextSelectionBackgroundFocused:
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 } 343 }
342 if (menu_item.corner_radius > 0) { 344 if (menu_item.corner_radius > 0) {
343 const SkScalar radius = SkIntToScalar(menu_item.corner_radius); 345 const SkScalar radius = SkIntToScalar(menu_item.corner_radius);
344 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint); 346 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint);
345 return; 347 return;
346 } 348 }
347 canvas->drawRect(gfx::RectToSkRect(rect), paint); 349 canvas->drawRect(gfx::RectToSkRect(rect), paint);
348 } 350 }
349 351
350 } // namespace ui 352 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698