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

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

Issue 2409563002: views: use darker stroke for non-prominent buttons (Closed)
Patch Set: Created 4 years, 2 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) 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 case NativeTheme::kColorId_BlueButtonShadowColor: 154 case NativeTheme::kColorId_BlueButtonShadowColor:
155 return kBlueButtonShadowColor; 155 return kBlueButtonShadowColor;
156 case NativeTheme::kColorId_ProminentButtonColor: 156 case NativeTheme::kColorId_ProminentButtonColor:
157 return kProminentButtonColor; 157 return kProminentButtonColor;
158 case NativeTheme::kColorId_TextOnProminentButtonColor: 158 case NativeTheme::kColorId_TextOnProminentButtonColor:
159 return kProminentButtonTextColor; 159 return kProminentButtonTextColor;
160 case NativeTheme::kColorId_ButtonPressedShade: 160 case NativeTheme::kColorId_ButtonPressedShade:
161 return SK_ColorTRANSPARENT; 161 return SK_ColorTRANSPARENT;
162 case NativeTheme::kColorId_ButtonDisabledColor: 162 case NativeTheme::kColorId_ButtonDisabledColor:
163 return kDisabledMenuItemForegroundColor; 163 return kDisabledMenuItemForegroundColor;
164 case NativeTheme::kColorId_ProminentButtonBorderColor:
165 return SK_ColorTRANSPARENT;
166 case NativeTheme::kColorId_NonProminentButtonBorderColor:
167 return SkColorSetA(SK_ColorBLACK, 0x33);
164 168
165 // MenuItem 169 // MenuItem
166 case NativeTheme::kColorId_SelectedMenuItemForegroundColor: 170 case NativeTheme::kColorId_SelectedMenuItemForegroundColor:
167 return kSelectedMenuItemForegroundColor; 171 return kSelectedMenuItemForegroundColor;
168 case NativeTheme::kColorId_MenuBorderColor: 172 case NativeTheme::kColorId_MenuBorderColor:
169 return kMenuBorderColor; 173 return kMenuBorderColor;
170 case NativeTheme::kColorId_EnabledMenuButtonBorderColor: 174 case NativeTheme::kColorId_EnabledMenuButtonBorderColor:
171 return kEnabledMenuButtonBorderColor; 175 return kEnabledMenuButtonBorderColor;
172 case NativeTheme::kColorId_FocusedMenuButtonBorderColor: 176 case NativeTheme::kColorId_FocusedMenuButtonBorderColor:
173 case NativeTheme::kColorId_HoverMenuButtonBorderColor: 177 case NativeTheme::kColorId_HoverMenuButtonBorderColor:
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 } 340 }
337 if (menu_item.corner_radius > 0) { 341 if (menu_item.corner_radius > 0) {
338 const SkScalar radius = SkIntToScalar(menu_item.corner_radius); 342 const SkScalar radius = SkIntToScalar(menu_item.corner_radius);
339 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint); 343 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint);
340 return; 344 return;
341 } 345 }
342 canvas->drawRect(gfx::RectToSkRect(rect), paint); 346 canvas->drawRect(gfx::RectToSkRect(rect), paint);
343 } 347 }
344 348
345 } // namespace ui 349 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/native_theme/native_theme.h » ('j') | ui/views/controls/button/md_text_button.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698