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

Side by Side Diff: ui/native_theme/native_theme_mac.mm

Issue 2393493005: views: Mac pressed button shade 0.05a -> 0.1a (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/native_theme/native_theme_mac.h" 5 #include "ui/native_theme/native_theme_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 return kMenuPopupBackgroundColor; 143 return kMenuPopupBackgroundColor;
144 case kColorId_MenuSeparatorColor: 144 case kColorId_MenuSeparatorColor:
145 return base::mac::IsOS10_9() ? kMenuSeparatorColorMavericks 145 return base::mac::IsOS10_9() ? kMenuSeparatorColorMavericks
146 : kMenuSeparatorColor; 146 : kMenuSeparatorColor;
147 case kColorId_MenuBorderColor: 147 case kColorId_MenuBorderColor:
148 return kMenuBorderColor; 148 return kMenuBorderColor;
149 149
150 // Mac has a different "pressed button" styling because it doesn't use 150 // Mac has a different "pressed button" styling because it doesn't use
151 // ripples. 151 // ripples.
152 case kColorId_ButtonPressedShade: 152 case kColorId_ButtonPressedShade:
153 return SkColorSetA(SK_ColorBLACK, 0x08); 153 return SkColorSetA(SK_ColorBLACK, 0x10);
154 154
155 // There's a system setting General > Highlight color which sets the 155 // There's a system setting General > Highlight color which sets the
156 // background color for text selections. We honor that setting. 156 // background color for text selections. We honor that setting.
157 // TODO(ellyjones): Listen for NSSystemColorsDidChangeNotification somewhere 157 // TODO(ellyjones): Listen for NSSystemColorsDidChangeNotification somewhere
158 // and propagate it to the View hierarchy. 158 // and propagate it to the View hierarchy.
159 case kColorId_TextfieldSelectionBackgroundFocused: 159 case kColorId_TextfieldSelectionBackgroundFocused:
160 return NSSystemColorToSkColor([NSColor selectedTextBackgroundColor]); 160 return NSSystemColorToSkColor([NSColor selectedTextBackgroundColor]);
161 default: 161 default:
162 break; 162 break;
163 } 163 }
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 canvas->drawDRRect(outer_shape, shape, paint); 436 canvas->drawDRRect(outer_shape, shape, paint);
437 } 437 }
438 438
439 NativeThemeMac::NativeThemeMac() { 439 NativeThemeMac::NativeThemeMac() {
440 } 440 }
441 441
442 NativeThemeMac::~NativeThemeMac() { 442 NativeThemeMac::~NativeThemeMac() {
443 } 443 }
444 444
445 } // namespace ui 445 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698