diff options
author | glen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-15 20:35:13 +0000 |
---|---|---|
committer | glen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-15 20:35:13 +0000 |
commit | fb23b9b370b689a954fb42b0beea2e61eee9e159 (patch) | |
tree | eec1d826f89a34d48de7868ca34fe05b8d2d9fc4 /chrome/browser/browser_theme_provider.cc | |
parent | 0aad67b662f0ba306eeea71117d77bccefc3533f (diff) | |
download | chromium_src-fb23b9b370b689a954fb42b0beea2e61eee9e159.zip chromium_src-fb23b9b370b689a954fb42b0beea2e61eee9e159.tar.gz chromium_src-fb23b9b370b689a954fb42b0beea2e61eee9e159.tar.bz2 |
Make our HSL shifting match Photoshop's.
Also clean up a bunch of PMColor code - skia_utils should operate on SkColors and PMColors should only ever be used by SkBitmaps and ImageOperations.
BUG=16687
Review URL: http://codereview.chromium.org/149663
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20788 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_theme_provider.cc')
-rw-r--r-- | chrome/browser/browser_theme_provider.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/chrome/browser/browser_theme_provider.cc b/chrome/browser/browser_theme_provider.cc index f130147..5bf91fe 100644 --- a/chrome/browser/browser_theme_provider.cc +++ b/chrome/browser/browser_theme_provider.cc @@ -107,7 +107,7 @@ const SkColor BrowserThemeProvider::kDefaultColorButtonBackground = NULL; const skia::HSL BrowserThemeProvider::kDefaultTintButtons = { -1, -1, -1 }; const skia::HSL BrowserThemeProvider::kDefaultTintFrame = { -1, -1, -1 }; const skia::HSL BrowserThemeProvider::kDefaultTintFrameInactive = - { -1, 0.5f, 0.72f }; + { -1, -1, 0.75f }; const skia::HSL BrowserThemeProvider::kDefaultTintFrameIncognito = { -1, 0.2f, 0.35f }; const skia::HSL BrowserThemeProvider::kDefaultTintFrameIncognitoInactive = @@ -578,22 +578,21 @@ void BrowserThemeProvider::SetTint(const char* key, const skia::HSL& tint) { void BrowserThemeProvider::GenerateFrameColors() { // Generate any secondary frame colors that weren't provided. - skia::HSL frame_hsl = { 0, 0, 0 }; - skia::SkColorToHSL(GetColor(COLOR_FRAME), frame_hsl); + SkColor frame = GetColor(COLOR_FRAME); if (colors_.find(kColorFrame) == colors_.end()) - colors_[kColorFrame] = HSLShift(frame_hsl, GetTint(TINT_FRAME)); + colors_[kColorFrame] = HSLShift(frame, GetTint(TINT_FRAME)); if (colors_.find(kColorFrameInactive) == colors_.end()) { colors_[kColorFrameInactive] = - HSLShift(frame_hsl, GetTint(TINT_FRAME_INACTIVE)); + HSLShift(frame, GetTint(TINT_FRAME_INACTIVE)); } if (colors_.find(kColorFrameIncognito) == colors_.end()) { colors_[kColorFrameIncognito] = - HSLShift(frame_hsl, GetTint(TINT_FRAME_INCOGNITO)); + HSLShift(frame, GetTint(TINT_FRAME_INCOGNITO)); } if (colors_.find(kColorFrameIncognitoInactive) == colors_.end()) { colors_[kColorFrameIncognitoInactive] = - HSLShift(frame_hsl, GetTint(TINT_FRAME_INCOGNITO_INACTIVE)); + HSLShift(frame, GetTint(TINT_FRAME_INCOGNITO_INACTIVE)); } } |