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

Unified Diff: chrome/common/gtk_util.cc

Issue 479006: re-apply r34183... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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/common/gtk_util.h ('k') | chrome/common/platform_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/gtk_util.cc
===================================================================
--- chrome/common/gtk_util.cc (revision 34187)
+++ chrome/common/gtk_util.cc (working copy)
@@ -13,6 +13,7 @@
#include "app/resource_bundle.h"
#include "base/linux_util.h"
#include "base/logging.h"
+#include "chrome/browser/gtk/gtk_theme_provider.h"
#include "chrome/common/renderer_preferences.h"
#include "grit/theme_resources.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -418,7 +419,8 @@
return content_alignment;
}
-void InitRendererPrefsFromGtkSettings(RendererPreferences* prefs) {
+void InitRendererPrefsFromGtkSettings(RendererPreferences* prefs,
+ bool use_gtk_theme) {
DCHECK(prefs);
gint antialias = 0;
@@ -475,6 +477,24 @@
prefs->focus_ring_color =
SkColorSetRGB(color.red / 257, color.green / 257, color.blue / 257);
+ GdkColor thumb_active_color, thumb_inactive_color, track_color;
+ GtkThemeProvider::GetScrollbarColors(&thumb_active_color,
+ &thumb_inactive_color,
+ &track_color,
+ use_gtk_theme);
+ prefs->thumb_active_color =
+ SkColorSetRGB(thumb_active_color.red / 257,
+ thumb_active_color.green / 257,
+ thumb_active_color.blue / 257);
+ prefs->thumb_inactive_color =
+ SkColorSetRGB(thumb_inactive_color.red / 257,
+ thumb_inactive_color.green / 257,
+ thumb_inactive_color.blue / 257);
+ prefs->track_color =
+ SkColorSetRGB(track_color.red / 257,
+ track_color.green / 257,
+ track_color.blue / 257);
+
if (hint_style)
g_free(hint_style);
if (rgba_style)
« no previous file with comments | « chrome/common/gtk_util.h ('k') | chrome/common/platform_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698