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

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

Issue 2784413002: Gtk3: Use Gtk window bg color as Chrome toolbar color (Closed)
Patch Set: Created 3 years, 9 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
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 122113b1d41fceff0651f74776eb88fbc54023a1..38db84c669d14f7d23df6617101163caa0f09887 100644
--- a/chrome/browser/ui/libgtkui/native_theme_gtk3.cc
+++ b/chrome/browser/ui/libgtkui/native_theme_gtk3.cc
@@ -234,8 +234,7 @@ SkColor SkColorFromColorId(ui::NativeTheme::ColorId color_id) {
case ui::NativeTheme::kColorId_TooltipBackground:
return GetBgColor("GtkTooltip#tooltip");
case ui::NativeTheme::kColorId_TooltipText:
- return color_utils::GetReadableColor(GetFgColor("GtkTooltip#tooltip"),
- GetBgColor("GtkTooltip#tooltip"));
+ return GetFgColor("GtkTooltip#tooltip GtkLabel");
// Trees and Tables (implemented on GTK using the same class)
case ui::NativeTheme::kColorId_TableBackground:
@@ -347,10 +346,10 @@ SkColor SkColorFromColorId(ui::NativeTheme::ColorId color_id) {
// Throbber
// TODO(thomasanderson): Render GtkSpinner directly.
case ui::NativeTheme::kColorId_ThrobberSpinningColor:
+ return GetFgColor("GtkSpinner#spinner");
case ui::NativeTheme::kColorId_ThrobberWaitingColor:
- return GetFgColor("GtkMenu#menu GtkSpinner#spinner");
case ui::NativeTheme::kColorId_ThrobberLightColor:
- return GetFgColor("GtkMenu#menu GtkSpinner#spinner:disabled");
+ return GetFgColor("GtkSpinner#spinner:disabled");
// Alert icons
// Fallback to the same colors as Aura.
@@ -358,9 +357,10 @@ SkColor SkColorFromColorId(ui::NativeTheme::ColorId color_id) {
case ui::NativeTheme::kColorId_AlertSeverityMedium:
case ui::NativeTheme::kColorId_AlertSeverityHigh: {
// Alert icons appear on the toolbar, so use the toolbar BG
- // color to determine if the dark Aura theme should be used.
+ // color (the GTK window bg color) to determine if the dark Aura
+ // theme should be used.
ui::NativeTheme* fallback_theme =
- color_utils::IsDark(GetBgColor("GtkToolbar#toolbar"))
+ color_utils::IsDark(GetBgColor(""))
? ui::NativeTheme::GetInstanceForNativeUi()
: ui::NativeThemeDarkAura::instance();
return fallback_theme->GetSystemColor(color_id);
@@ -403,7 +403,6 @@ NativeThemeGtk3::NativeThemeGtk3() {
g_type_class_unref(g_type_class_ref(gtk_separator_get_type()));
g_type_class_unref(g_type_class_ref(gtk_spinner_get_type()));
g_type_class_unref(g_type_class_ref(gtk_text_view_get_type()));
- g_type_class_unref(g_type_class_ref(gtk_toolbar_get_type()));
g_type_class_unref(g_type_class_ref(gtk_tooltip_get_type()));
g_type_class_unref(g_type_class_ref(gtk_tree_view_get_type()));
g_type_class_unref(g_type_class_ref(gtk_window_get_type()));
« chrome/browser/ui/libgtkui/gtk_ui.cc ('K') | « chrome/browser/ui/libgtkui/gtk_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698