diff options
author | mirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-10 16:33:21 +0000 |
---|---|---|
committer | mirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-10 16:33:21 +0000 |
commit | a3beea096867ccdd8e5455adf14eebe29367c11f (patch) | |
tree | 2174052683dec5fc401ae3faec9459d991f6489d /chrome/browser | |
parent | 25a8dba0560239d67876c4a2b70984bbc47cdd57 (diff) | |
download | chromium_src-a3beea096867ccdd8e5455adf14eebe29367c11f.zip chromium_src-a3beea096867ccdd8e5455adf14eebe29367c11f.tar.gz chromium_src-a3beea096867ccdd8e5455adf14eebe29367c11f.tar.bz2 |
Fix problem of white box appearing in themes without an NTP background image.
BUG= http://crbug.com/21290
TEST= Install a theme without an NTP image (greyscale). Look at NTP with bookmarkbar attached and detached. See no white box at bottom of NTP.
Review URL: http://codereview.chromium.org/194066
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25861 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/browser_theme_provider.cc | 7 | ||||
-rw-r--r-- | chrome/browser/dom_ui/dom_ui_theme_source.cc | 16 |
2 files changed, 15 insertions, 8 deletions
diff --git a/chrome/browser/browser_theme_provider.cc b/chrome/browser/browser_theme_provider.cc index aaf7694..9905d45 100644 --- a/chrome/browser/browser_theme_provider.cc +++ b/chrome/browser/browser_theme_provider.cc @@ -256,6 +256,13 @@ BrowserThemeProvider::BrowserThemeProvider() resource_names_[IDR_THEME_TAB_BACKGROUND] = "theme_tab_background"; resource_names_[IDR_THEME_TAB_BACKGROUND_INCOGNITO] = "theme_tab_background_incognito"; + resource_names_[IDR_THEME_TOOLBAR] = "theme_toolbar"; + resource_names_[IDR_THEME_TAB_BACKGROUND_V] = "theme_tab_background_v"; + resource_names_[IDR_THEME_NTP_BACKGROUND] = "theme_ntp_background"; + resource_names_[IDR_THEME_BUTTON_BACKGROUND] = "theme_button_background"; + resource_names_[IDR_THEME_NTP_ATTRIBUTION] = "theme_ntp_attribution"; + resource_names_[IDR_THEME_WINDOW_CONTROL_BACKGROUND] = + "theme_window_control_background"; } } diff --git a/chrome/browser/dom_ui/dom_ui_theme_source.cc b/chrome/browser/dom_ui/dom_ui_theme_source.cc index 8959b40..f2ebbf5 100644 --- a/chrome/browser/dom_ui/dom_ui_theme_source.cc +++ b/chrome/browser/dom_ui/dom_ui_theme_source.cc @@ -255,6 +255,14 @@ std::string DOMUIThemeSource::GetNewTabBackgroundCSS(bool bar_attached) { profile_->GetThemeProvider()->GetDisplayProperty( BrowserThemeProvider::NTP_BACKGROUND_ALIGNMENT, &alignment); + // TODO(glen): This is a quick workaround to hide the notused.png image when + // no image is provided - we don't have time right now to figure out why + // this is painting as white. + // http://crbug.com/17593 + if (!profile_->GetThemeProvider()->HasCustomImage(IDR_THEME_NTP_BACKGROUND)) { + return "-64px"; + } + if (bar_attached) return BrowserThemeProvider::AlignmentToString(alignment); @@ -266,14 +274,6 @@ std::string DOMUIThemeSource::GetNewTabBackgroundCSS(bool bar_attached) { int offset = 0; #endif - // TODO(glen): This is a quick workaround to hide the notused.png image when - // no image is provided - we don't have time right now to figure out why - // this is painting as white. - // http://crbug.com/17593 - if (!profile_->GetThemeProvider()->HasCustomImage(IDR_THEME_NTP_BACKGROUND)) { - return "-64px"; - } - if (alignment & BrowserThemeProvider::ALIGN_TOP) { if (alignment & BrowserThemeProvider::ALIGN_LEFT) return "0% " + IntToString(-offset) + "px"; |