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

Unified Diff: ui/native_theme/native_theme_mac.mm

Issue 2413223003: Views:: Make Labels support text selection. (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/native_theme/native_theme_dark_aura.cc ('k') | ui/native_theme/native_theme_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/native_theme/native_theme_mac.mm
diff --git a/ui/native_theme/native_theme_mac.mm b/ui/native_theme/native_theme_mac.mm
index d0b304e12ce0766245510dff51425e3650f27a04..36a58dc1d810ba40479bf2b03a421c9b16c67f28 100644
--- a/ui/native_theme/native_theme_mac.mm
+++ b/ui/native_theme/native_theme_mac.mm
@@ -159,6 +159,7 @@ SkColor ColorToGrayscale(SkColor color) {
// background color for text selections. We honor that setting.
// TODO(ellyjones): Listen for NSSystemColorsDidChangeNotification somewhere
// and propagate it to the View hierarchy.
+ case kColorId_LabelTextSelectionBackgroundFocused:
case kColorId_TextfieldSelectionBackgroundFocused:
return NSSystemColorToSkColor([NSColor selectedTextBackgroundColor]);
default:
@@ -198,6 +199,8 @@ SkColor ColorToGrayscale(SkColor color) {
return NSSystemColorToSkColor([NSColor disabledControlTextColor]);
case kColorId_ButtonHoverColor:
return NSSystemColorToSkColor([NSColor selectedControlTextColor]);
+ case kColorId_LabelTextSelectionColor:
+ return NSSystemColorToSkColor([NSColor selectedTextColor]);
// Link.
case kColorId_LinkDisabled:
« no previous file with comments | « ui/native_theme/native_theme_dark_aura.cc ('k') | ui/native_theme/native_theme_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698