summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/gtk_theme_provider.cc
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-15 20:01:14 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-15 20:01:14 +0000
commit2b56832683197686038bcbf7b1ef662e9a41268a (patch)
tree43c78f71a29d289fd6ed64ac7563d6e8cc87ad62 /chrome/browser/gtk/gtk_theme_provider.cc
parent362bb99ffd47980be15a2a377cdcf6fad105b2ea (diff)
downloadchromium_src-2b56832683197686038bcbf7b1ef662e9a41268a.zip
chromium_src-2b56832683197686038bcbf7b1ef662e9a41268a.tar.gz
chromium_src-2b56832683197686038bcbf7b1ef662e9a41268a.tar.bz2
GTK Themes: Inactive title bars should follow the bg insensitive color.
This solves the inactive skyline color often being laughably bad. It does show that we may want to draw the line between the skyline and toolbar for best visual effect, though... Review URL: http://codereview.chromium.org/149693 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20774 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/gtk_theme_provider.cc')
-rw-r--r--chrome/browser/gtk/gtk_theme_provider.cc19
1 files changed, 13 insertions, 6 deletions
diff --git a/chrome/browser/gtk/gtk_theme_provider.cc b/chrome/browser/gtk/gtk_theme_provider.cc
index 81565d1..f18ff3f 100644
--- a/chrome/browser/gtk/gtk_theme_provider.cc
+++ b/chrome/browser/gtk/gtk_theme_provider.cc
@@ -26,6 +26,8 @@ namespace {
const int kToolbarImageWidth = 64;
const int kToolbarImageHeight = 128;
+const skia::HSL kExactColor = { -1, -1, -1 };
+
} // namespace
// static
@@ -185,19 +187,24 @@ void GtkThemeProvider::LoadGtkValues() {
kDefaultTintButtons);
SetThemeTintFromGtk(kTintFrame, &style->bg[GTK_STATE_SELECTED],
kDefaultTintFrame);
- SetThemeTintFromGtk(kTintFrameInactive,
- &style->bg[GTK_STATE_SELECTED],
- kDefaultTintFrameInactive);
SetThemeTintFromGtk(kTintFrameIncognito,
&style->bg[GTK_STATE_SELECTED],
kDefaultTintFrameIncognito);
- SetThemeTintFromGtk(kTintFrameIncognitoInactive,
- &style->bg[GTK_STATE_SELECTED],
- kDefaultTintFrameIncognitoInactive);
SetThemeTintFromGtk(kTintBackgroundTab,
&style->bg[GTK_STATE_SELECTED],
kDefaultTintBackgroundTab);
+ // The inactive color/tint is special: We *must* use the exact insensitive
+ // color for all inactive windows, otherwise we end up neon pink half the
+ // time.
+ SetThemeColorFromGtk(kColorFrameInactive, &style->bg[GTK_STATE_INSENSITIVE]);
+ SetThemeTintFromGtk(kTintFrameInactive,
+ &style->bg[GTK_STATE_INSENSITIVE],
+ kExactColor);
+ SetThemeTintFromGtk(kTintFrameIncognitoInactive,
+ &style->bg[GTK_STATE_INSENSITIVE],
+ kExactColor);
+
GenerateFrameColors();
GenerateFrameImages();
}