summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_theme_provider.cc
diff options
context:
space:
mode:
authorglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-15 01:18:52 +0000
committerglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-15 01:18:52 +0000
commitf18fdc277a982ad2aded65ea7b13a2df341590c9 (patch)
tree106232e7cc7b3404699600bf3b6b68ee01b13d9b /chrome/browser/browser_theme_provider.cc
parent834bf39ca4b399c3c58892994043efa26e3ffe47 (diff)
downloadchromium_src-f18fdc277a982ad2aded65ea7b13a2df341590c9.zip
chromium_src-f18fdc277a982ad2aded65ea7b13a2df341590c9.tar.gz
chromium_src-f18fdc277a982ad2aded65ea7b13a2df341590c9.tar.bz2
Make theme provider remember display properties settings and color's alpha.
BUG=15527 Review URL: http://codereview.chromium.org/155033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20703 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_theme_provider.cc')
-rw-r--r--chrome/browser/browser_theme_provider.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/chrome/browser/browser_theme_provider.cc b/chrome/browser/browser_theme_provider.cc
index 4626006..f130147 100644
--- a/chrome/browser/browser_theme_provider.cc
+++ b/chrome/browser/browser_theme_provider.cc
@@ -696,11 +696,13 @@ void BrowserThemeProvider::SaveColorData() {
if (colors_.size()) {
ColorMap::iterator iter = colors_.begin();
while (iter != colors_.end()) {
- SkColor rgb = (*iter).second;
+ SkColor rgba = (*iter).second;
ListValue* rgb_list = new ListValue();
- rgb_list->Set(0, Value::CreateIntegerValue(SkColorGetR(rgb)));
- rgb_list->Set(1, Value::CreateIntegerValue(SkColorGetG(rgb)));
- rgb_list->Set(2, Value::CreateIntegerValue(SkColorGetB(rgb)));
+ rgb_list->Set(0, Value::CreateIntegerValue(SkColorGetR(rgba)));
+ rgb_list->Set(1, Value::CreateIntegerValue(SkColorGetG(rgba)));
+ rgb_list->Set(2, Value::CreateIntegerValue(SkColorGetB(rgba)));
+ if (SkColorGetA(rgba) != 255)
+ rgb_list->Set(3, Value::CreateRealValue(SkColorGetA(rgba)));
pref_colors->Set(UTF8ToWide((*iter).first), rgb_list);
++iter;
}
@@ -769,6 +771,8 @@ void BrowserThemeProvider::LoadThemePrefs() {
FilePath());
SetColorData(prefs->GetMutableDictionary(prefs::kCurrentThemeColors));
SetTintData(prefs->GetMutableDictionary(prefs::kCurrentThemeTints));
+ SetDisplayPropertyData(
+ prefs->GetMutableDictionary(prefs::kCurrentThemeDisplayProperties));
GenerateFrameColors();
GenerateFrameImages();
UserMetrics::RecordAction(L"Themes_loaded", profile_);