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

Unified Diff: ui/native_theme/native_theme_mac.mm

Issue 2413223003: Views:: Make Labels support text selection. (Closed)
Patch Set: Address comments. 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
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 c6c79f7dc94eadfb475ba8917551248bc3398673..b5434a627750ac2232e72a958069f54ecc635403 100644
--- a/ui/native_theme/native_theme_mac.mm
+++ b/ui/native_theme/native_theme_mac.mm
@@ -154,6 +154,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:
@@ -193,6 +194,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:

Powered by Google App Engine
This is Rietveld 408576698