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

Unified Diff: ui/native_theme/native_theme_win.cc

Issue 2413223003: Views:: Make Labels support text selection. (Closed)
Patch Set: Fix text selection background color on Windows. 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_mac.mm ('k') | ui/views/controls/label.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/native_theme/native_theme_win.cc
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
index 674352c4a22f553e26c974d337371fb0efd907dc..cc90f3e2060515fbbc6dab55763fcec1f0a1763d 100644
--- a/ui/native_theme/native_theme_win.cc
+++ b/ui/native_theme/native_theme_win.cc
@@ -517,6 +517,8 @@ SkColor NativeThemeWin::GetSystemColor(ColorId color_id) const {
const SkColor kResultsTableUrlColor =
md ? gfx::kGoogleBlue700 : SkColorSetRGB(0x0b, 0x80, 0x43);
const SkColor kResultsTableSelectedUrlColor = SK_ColorWHITE;
+ // Label:
+ const SkColor kLabelTextSelectionBackgroundFocusedColor = gfx::kGoogleBlue700;
switch (color_id) {
// Windows
@@ -549,6 +551,10 @@ SkColor NativeThemeWin::GetSystemColor(ColorId color_id) const {
return system_colors_[COLOR_BTNTEXT];
case kColorId_LabelDisabledColor:
return system_colors_[COLOR_GRAYTEXT];
+ case kColorId_LabelTextSelectionColor:
+ return system_colors_[COLOR_HIGHLIGHTTEXT];
+ case kColorId_LabelTextSelectionBackgroundFocused:
+ return kLabelTextSelectionBackgroundFocusedColor;
karandeepb 2016/11/07 04:06:36 Tested the patch on Windows as well. Had to chan
// Textfield
case kColorId_TextfieldDefaultColor:
« no previous file with comments | « ui/native_theme/native_theme_mac.mm ('k') | ui/views/controls/label.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698