From 385967fc796c6cd98ba62c3607f2e1287e4b7fa9 Mon Sep 17 00:00:00 2001 From: "glen@chromium.org" Date: Wed, 3 Jun 2009 18:21:13 +0000 Subject: Theme the download bar. Mostly this is just changing the background color to match the toolbar, and making the button images transparent. BUG=11703 TEST=Verify that the download bar matches the theme that is installed. Review URL: http://codereview.chromium.org/119088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17502 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/app/theme/download_button_center_bottom.png | Bin 303 -> 319 bytes chrome/app/theme/download_button_center_bottom_h.png | Bin 267 -> 290 bytes chrome/app/theme/download_button_center_bottom_p.png | Bin 300 -> 316 bytes chrome/app/theme/download_button_center_middle.png | Bin 112 -> 113 bytes chrome/app/theme/download_button_center_middle_h.png | Bin 112 -> 113 bytes chrome/app/theme/download_button_center_middle_p.png | Bin 112 -> 113 bytes chrome/app/theme/download_button_center_top.png | Bin 518 -> 510 bytes chrome/app/theme/download_button_center_top_h.png | Bin 330 -> 361 bytes chrome/app/theme/download_button_center_top_p.png | Bin 519 -> 522 bytes chrome/app/theme/download_button_left_bottom.png | Bin 256 -> 257 bytes chrome/app/theme/download_button_left_bottom_h.png | Bin 251 -> 246 bytes chrome/app/theme/download_button_left_bottom_p.png | Bin 272 -> 279 bytes chrome/app/theme/download_button_left_middle.png | Bin 122 -> 123 bytes chrome/app/theme/download_button_left_middle_h.png | Bin 122 -> 123 bytes chrome/app/theme/download_button_left_middle_p.png | Bin 126 -> 127 bytes chrome/app/theme/download_button_left_top.png | Bin 309 -> 327 bytes chrome/app/theme/download_button_left_top_h.png | Bin 265 -> 298 bytes chrome/app/theme/download_button_left_top_p.png | Bin 349 -> 357 bytes chrome/app/theme/download_button_menu_bottom.png | Bin 333 -> 321 bytes chrome/app/theme/download_button_menu_bottom_h.png | Bin 311 -> 310 bytes chrome/app/theme/download_button_menu_bottom_p.png | Bin 350 -> 365 bytes chrome/app/theme/download_button_menu_middle.png | Bin 127 -> 128 bytes chrome/app/theme/download_button_menu_middle_h.png | Bin 126 -> 128 bytes chrome/app/theme/download_button_menu_middle_p.png | Bin 134 -> 136 bytes chrome/app/theme/download_button_menu_top.png | Bin 490 -> 510 bytes chrome/app/theme/download_button_menu_top_h.png | Bin 434 -> 440 bytes chrome/app/theme/download_button_menu_top_p.png | Bin 537 -> 545 bytes chrome/app/theme/download_button_right_bottom.png | Bin 175 -> 178 bytes chrome/app/theme/download_button_right_bottom_h.png | Bin 170 -> 171 bytes chrome/app/theme/download_button_right_bottom_no_dd.png | Bin 297 -> 250 bytes chrome/app/theme/download_button_right_bottom_p.png | Bin 191 -> 197 bytes chrome/app/theme/download_button_right_middle.png | Bin 111 -> 112 bytes chrome/app/theme/download_button_right_middle_h.png | Bin 111 -> 112 bytes chrome/app/theme/download_button_right_middle_no_dd.png | Bin 123 -> 119 bytes chrome/app/theme/download_button_right_middle_p.png | Bin 117 -> 117 bytes chrome/app/theme/download_button_right_top.png | Bin 230 -> 235 bytes chrome/app/theme/download_button_right_top_h.png | Bin 192 -> 195 bytes chrome/app/theme/download_button_right_top_no_dd.png | Bin 356 -> 347 bytes chrome/app/theme/download_button_right_top_p.png | Bin 242 -> 251 bytes chrome/browser/views/download_shelf_view.cc | 11 +++++++---- 40 files changed, 7 insertions(+), 4 deletions(-) (limited to 'chrome') diff --git a/chrome/app/theme/download_button_center_bottom.png b/chrome/app/theme/download_button_center_bottom.png index e927272..98b33ac 100644 Binary files a/chrome/app/theme/download_button_center_bottom.png and b/chrome/app/theme/download_button_center_bottom.png differ diff --git a/chrome/app/theme/download_button_center_bottom_h.png b/chrome/app/theme/download_button_center_bottom_h.png index dab6ebd..fbb438d 100644 Binary files a/chrome/app/theme/download_button_center_bottom_h.png and b/chrome/app/theme/download_button_center_bottom_h.png differ diff --git a/chrome/app/theme/download_button_center_bottom_p.png b/chrome/app/theme/download_button_center_bottom_p.png index 792d103..5aec7e4 100644 Binary files a/chrome/app/theme/download_button_center_bottom_p.png and b/chrome/app/theme/download_button_center_bottom_p.png differ diff --git a/chrome/app/theme/download_button_center_middle.png b/chrome/app/theme/download_button_center_middle.png index f9d72aa..61c8e1d 100644 Binary files a/chrome/app/theme/download_button_center_middle.png and b/chrome/app/theme/download_button_center_middle.png differ diff --git a/chrome/app/theme/download_button_center_middle_h.png b/chrome/app/theme/download_button_center_middle_h.png index dc872dd..752c9bc 100644 Binary files a/chrome/app/theme/download_button_center_middle_h.png and b/chrome/app/theme/download_button_center_middle_h.png differ diff --git a/chrome/app/theme/download_button_center_middle_p.png b/chrome/app/theme/download_button_center_middle_p.png index f9d72aa..3e0f9bd 100644 Binary files a/chrome/app/theme/download_button_center_middle_p.png and b/chrome/app/theme/download_button_center_middle_p.png differ diff --git a/chrome/app/theme/download_button_center_top.png b/chrome/app/theme/download_button_center_top.png index d6686a4..c42d5e5 100644 Binary files a/chrome/app/theme/download_button_center_top.png and b/chrome/app/theme/download_button_center_top.png differ diff --git a/chrome/app/theme/download_button_center_top_h.png b/chrome/app/theme/download_button_center_top_h.png index b556052..011e84b 100644 Binary files a/chrome/app/theme/download_button_center_top_h.png and b/chrome/app/theme/download_button_center_top_h.png differ diff --git a/chrome/app/theme/download_button_center_top_p.png b/chrome/app/theme/download_button_center_top_p.png index a513665..02f1bd4 100644 Binary files a/chrome/app/theme/download_button_center_top_p.png and b/chrome/app/theme/download_button_center_top_p.png differ diff --git a/chrome/app/theme/download_button_left_bottom.png b/chrome/app/theme/download_button_left_bottom.png index 90fe6f4..6606ec5 100644 Binary files a/chrome/app/theme/download_button_left_bottom.png and b/chrome/app/theme/download_button_left_bottom.png differ diff --git a/chrome/app/theme/download_button_left_bottom_h.png b/chrome/app/theme/download_button_left_bottom_h.png index 2a39214..97af1f7 100644 Binary files a/chrome/app/theme/download_button_left_bottom_h.png and b/chrome/app/theme/download_button_left_bottom_h.png differ diff --git a/chrome/app/theme/download_button_left_bottom_p.png b/chrome/app/theme/download_button_left_bottom_p.png index 59046e2..feed5bb 100644 Binary files a/chrome/app/theme/download_button_left_bottom_p.png and b/chrome/app/theme/download_button_left_bottom_p.png differ diff --git a/chrome/app/theme/download_button_left_middle.png b/chrome/app/theme/download_button_left_middle.png index 877842a..2dbe452 100644 Binary files a/chrome/app/theme/download_button_left_middle.png and b/chrome/app/theme/download_button_left_middle.png differ diff --git a/chrome/app/theme/download_button_left_middle_h.png b/chrome/app/theme/download_button_left_middle_h.png index 056e691..e141981 100644 Binary files a/chrome/app/theme/download_button_left_middle_h.png and b/chrome/app/theme/download_button_left_middle_h.png differ diff --git a/chrome/app/theme/download_button_left_middle_p.png b/chrome/app/theme/download_button_left_middle_p.png index 68be397..f19b54b 100644 Binary files a/chrome/app/theme/download_button_left_middle_p.png and b/chrome/app/theme/download_button_left_middle_p.png differ diff --git a/chrome/app/theme/download_button_left_top.png b/chrome/app/theme/download_button_left_top.png index cd1464e..bf880da 100644 Binary files a/chrome/app/theme/download_button_left_top.png and b/chrome/app/theme/download_button_left_top.png differ diff --git a/chrome/app/theme/download_button_left_top_h.png b/chrome/app/theme/download_button_left_top_h.png index de955ae..8fff154 100644 Binary files a/chrome/app/theme/download_button_left_top_h.png and b/chrome/app/theme/download_button_left_top_h.png differ diff --git a/chrome/app/theme/download_button_left_top_p.png b/chrome/app/theme/download_button_left_top_p.png index 6749207..1c3d1e1 100644 Binary files a/chrome/app/theme/download_button_left_top_p.png and b/chrome/app/theme/download_button_left_top_p.png differ diff --git a/chrome/app/theme/download_button_menu_bottom.png b/chrome/app/theme/download_button_menu_bottom.png index 6a64c12..12a9f40 100644 Binary files a/chrome/app/theme/download_button_menu_bottom.png and b/chrome/app/theme/download_button_menu_bottom.png differ diff --git a/chrome/app/theme/download_button_menu_bottom_h.png b/chrome/app/theme/download_button_menu_bottom_h.png index cf5a68d..2857f50 100644 Binary files a/chrome/app/theme/download_button_menu_bottom_h.png and b/chrome/app/theme/download_button_menu_bottom_h.png differ diff --git a/chrome/app/theme/download_button_menu_bottom_p.png b/chrome/app/theme/download_button_menu_bottom_p.png index 5941bc7..d7dcbb7 100644 Binary files a/chrome/app/theme/download_button_menu_bottom_p.png and b/chrome/app/theme/download_button_menu_bottom_p.png differ diff --git a/chrome/app/theme/download_button_menu_middle.png b/chrome/app/theme/download_button_menu_middle.png index ed0920d..f652f9e 100644 Binary files a/chrome/app/theme/download_button_menu_middle.png and b/chrome/app/theme/download_button_menu_middle.png differ diff --git a/chrome/app/theme/download_button_menu_middle_h.png b/chrome/app/theme/download_button_menu_middle_h.png index 9070d29..83be232 100644 Binary files a/chrome/app/theme/download_button_menu_middle_h.png and b/chrome/app/theme/download_button_menu_middle_h.png differ diff --git a/chrome/app/theme/download_button_menu_middle_p.png b/chrome/app/theme/download_button_menu_middle_p.png index 8302352..069efef 100644 Binary files a/chrome/app/theme/download_button_menu_middle_p.png and b/chrome/app/theme/download_button_menu_middle_p.png differ diff --git a/chrome/app/theme/download_button_menu_top.png b/chrome/app/theme/download_button_menu_top.png index 2569b15..95166e3 100644 Binary files a/chrome/app/theme/download_button_menu_top.png and b/chrome/app/theme/download_button_menu_top.png differ diff --git a/chrome/app/theme/download_button_menu_top_h.png b/chrome/app/theme/download_button_menu_top_h.png index 061da6d..079b25e 100644 Binary files a/chrome/app/theme/download_button_menu_top_h.png and b/chrome/app/theme/download_button_menu_top_h.png differ diff --git a/chrome/app/theme/download_button_menu_top_p.png b/chrome/app/theme/download_button_menu_top_p.png index 770c445..07418f8 100644 Binary files a/chrome/app/theme/download_button_menu_top_p.png and b/chrome/app/theme/download_button_menu_top_p.png differ diff --git a/chrome/app/theme/download_button_right_bottom.png b/chrome/app/theme/download_button_right_bottom.png index 92ce88b..8b63cb9 100644 Binary files a/chrome/app/theme/download_button_right_bottom.png and b/chrome/app/theme/download_button_right_bottom.png differ diff --git a/chrome/app/theme/download_button_right_bottom_h.png b/chrome/app/theme/download_button_right_bottom_h.png index 0e59f8d..0adcdbd 100644 Binary files a/chrome/app/theme/download_button_right_bottom_h.png and b/chrome/app/theme/download_button_right_bottom_h.png differ diff --git a/chrome/app/theme/download_button_right_bottom_no_dd.png b/chrome/app/theme/download_button_right_bottom_no_dd.png index 4c9d3db..d54a941 100644 Binary files a/chrome/app/theme/download_button_right_bottom_no_dd.png and b/chrome/app/theme/download_button_right_bottom_no_dd.png differ diff --git a/chrome/app/theme/download_button_right_bottom_p.png b/chrome/app/theme/download_button_right_bottom_p.png index ddfc3f1..784bf8a 100644 Binary files a/chrome/app/theme/download_button_right_bottom_p.png and b/chrome/app/theme/download_button_right_bottom_p.png differ diff --git a/chrome/app/theme/download_button_right_middle.png b/chrome/app/theme/download_button_right_middle.png index a513303..a0bda71 100644 Binary files a/chrome/app/theme/download_button_right_middle.png and b/chrome/app/theme/download_button_right_middle.png differ diff --git a/chrome/app/theme/download_button_right_middle_h.png b/chrome/app/theme/download_button_right_middle_h.png index 3a9616e..e539c22 100644 Binary files a/chrome/app/theme/download_button_right_middle_h.png and b/chrome/app/theme/download_button_right_middle_h.png differ diff --git a/chrome/app/theme/download_button_right_middle_no_dd.png b/chrome/app/theme/download_button_right_middle_no_dd.png index df2cf9e..82d6e14 100644 Binary files a/chrome/app/theme/download_button_right_middle_no_dd.png and b/chrome/app/theme/download_button_right_middle_no_dd.png differ diff --git a/chrome/app/theme/download_button_right_middle_p.png b/chrome/app/theme/download_button_right_middle_p.png index 95e38b8..1ce21c1 100644 Binary files a/chrome/app/theme/download_button_right_middle_p.png and b/chrome/app/theme/download_button_right_middle_p.png differ diff --git a/chrome/app/theme/download_button_right_top.png b/chrome/app/theme/download_button_right_top.png index 3de006e..14b60bb 100644 Binary files a/chrome/app/theme/download_button_right_top.png and b/chrome/app/theme/download_button_right_top.png differ diff --git a/chrome/app/theme/download_button_right_top_h.png b/chrome/app/theme/download_button_right_top_h.png index 738c15f..fdf40f7 100644 Binary files a/chrome/app/theme/download_button_right_top_h.png and b/chrome/app/theme/download_button_right_top_h.png differ diff --git a/chrome/app/theme/download_button_right_top_no_dd.png b/chrome/app/theme/download_button_right_top_no_dd.png index f57fd85..e43011c 100644 Binary files a/chrome/app/theme/download_button_right_top_no_dd.png and b/chrome/app/theme/download_button_right_top_no_dd.png differ diff --git a/chrome/app/theme/download_button_right_top_p.png b/chrome/app/theme/download_button_right_top_p.png index 3f44934..2ef3c16 100644 Binary files a/chrome/app/theme/download_button_right_top_p.png and b/chrome/app/theme/download_button_right_top_p.png differ diff --git a/chrome/browser/views/download_shelf_view.cc b/chrome/browser/views/download_shelf_view.cc index ba87039..fcf01df 100644 --- a/chrome/browser/views/download_shelf_view.cc +++ b/chrome/browser/views/download_shelf_view.cc @@ -10,6 +10,7 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "base/logging.h" +#include "chrome/browser/browser_theme_provider.h" #include "chrome/browser/download/download_item_model.h" #include "chrome/browser/download/download_manager.h" #include "chrome/browser/tab_contents/navigation_entry.h" @@ -43,9 +44,6 @@ static const int kTopBottomPadding = 2; // Padding between the icon and 'show all downloads' link static const int kDownloadsTitlePadding = 4; -// Default background color for the shelf. -static const SkColor kBackgroundColor = SkColorSetRGB(230, 237, 244); - // Border color. static const SkColor kBorderColor = SkColorSetRGB(214, 214, 214); @@ -101,7 +99,6 @@ void DownloadShelfView::Init() { close_button_->SetImage(views::CustomButton::BS_PUSHED, rb.GetBitmapNamed(IDR_CLOSE_BAR_P)); AddChildView(close_button_); - set_background(views::Background::CreateSolidBackground(kBackgroundColor)); new_item_animation_.reset(new SlideAnimation(this)); new_item_animation_->SetSlideDuration(kNewItemAnimationDurationMs); @@ -205,6 +202,12 @@ void DownloadShelfView::Layout() { if (!GetWidget()) return; + // Now that we know we have a parent, we can safely set our theme colors. + show_all_view_->SetColor( + GetThemeProvider()->GetColor(BrowserThemeProvider::COLOR_BOOKMARK_TEXT)); + set_background(views::Background::CreateSolidBackground( + GetThemeProvider()->GetColor(BrowserThemeProvider::COLOR_TOOLBAR))); + // Let our base class layout our child views views::View::Layout(); -- cgit v1.1