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

Unified Diff: chrome/browser/ui/libgtkui/native_theme_gtk3.cc

Issue 2721493002: Gtk3: Fix GtkTextView colors (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/libgtkui/gtk_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/libgtkui/native_theme_gtk3.cc
diff --git a/chrome/browser/ui/libgtkui/native_theme_gtk3.cc b/chrome/browser/ui/libgtkui/native_theme_gtk3.cc
index 113951a284036bdf42f25bb867b3dd81952c2fa2..2bf1e90065ebd154a4c05bdec1063f4f8ac9a613 100644
--- a/chrome/browser/ui/libgtkui/native_theme_gtk3.cc
+++ b/chrome/browser/ui/libgtkui/native_theme_gtk3.cc
@@ -143,9 +143,11 @@ SkColor SkColorFromColorId(ui::NativeTheme::ColorId color_id) {
case ui::NativeTheme::kColorId_LabelDisabledColor:
return GetFgColor("GtkLabel:disabled");
case ui::NativeTheme::kColorId_LabelTextSelectionColor:
- return GetSelectedTextColor("GtkLabel");
+ return GetFgColor(GtkVersionCheck(3, 20) ? "GtkLabel #selection"
+ : "GtkLabel:selected");
case ui::NativeTheme::kColorId_LabelTextSelectionBackgroundFocused:
- return GetSelectedBgColor("GtkLabel");
+ return GetSelectionBgColor(GtkVersionCheck(3, 20) ? "GtkLabel #selection"
+ : "GtkLabel:selected");
// Link
case ui::NativeTheme::kColorId_LinkDisabled:
@@ -223,17 +225,28 @@ SkColor SkColorFromColorId(ui::NativeTheme::ColorId color_id) {
// Textfield
case ui::NativeTheme::kColorId_TextfieldDefaultColor:
- return GetFgColor("GtkTextView#textview.view");
+ return GetFgColor(GtkVersionCheck(3, 20)
+ ? "GtkTextView#textview.view #text"
+ : "GtkTextView");
case ui::NativeTheme::kColorId_TextfieldDefaultBackground:
- return GetBgColor("GtkTextView#textview.view");
+ return GetBgColor(GtkVersionCheck(3, 20) ? "GtkTextView#textview.view"
+ : "GtkTextView");
case ui::NativeTheme::kColorId_TextfieldReadOnlyColor:
- return GetFgColor("GtkTextView#textview.view:disabled");
+ return GetFgColor(GtkVersionCheck(3, 20)
+ ? "GtkTextView#textview.view:disabled #text"
+ : "GtkTextView:disabled");
case ui::NativeTheme::kColorId_TextfieldReadOnlyBackground:
- return GetBgColor("GtkTextView#textview.view:disabled");
+ return GetBgColor(GtkVersionCheck(3, 20)
+ ? "GtkTextView#textview.view:disabled"
+ : "GtkTextView:disabled");
case ui::NativeTheme::kColorId_TextfieldSelectionColor:
- return GetSelectedTextColor("GtkTextView#textview.view");
+ return GetFgColor(GtkVersionCheck(3, 20)
+ ? "GtkTextView#textview.view #text #selection"
+ : "GtkTextView:selected");
case ui::NativeTheme::kColorId_TextfieldSelectionBackgroundFocused:
- return GetSelectedBgColor("GtkTextView#textview.view");
+ return GetSelectionBgColor(
+ GtkVersionCheck(3, 20) ? "GtkTextView#textview.view #text #selection"
+ : "GtkTextView:selected");
// Tooltips
case ui::NativeTheme::kColorId_TooltipBackground:
« no previous file with comments | « chrome/browser/ui/libgtkui/gtk_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698