From 1b301a7260940d5376bdfd0eac2011ee55c30434 Mon Sep 17 00:00:00 2001 From: "glen@chromium.org" Date: Fri, 24 Jul 2009 00:34:38 +0000 Subject: Revert 21474 TBR=joshia BUG=none TEST=none Review URL: http://codereview.chromium.org/160074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21489 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/app/theme/tab_close.png | Bin 120 -> 257 bytes chrome/app/theme/tab_close_mask.png | Bin 243 -> 0 bytes chrome/app/theme/theme_resources.grd | 2 -- chrome/browser/views/tabs/tab_renderer.cc | 15 --------------- chrome/browser/views/tabs/tab_renderer.h | 5 +---- 5 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 chrome/app/theme/tab_close_mask.png diff --git a/chrome/app/theme/tab_close.png b/chrome/app/theme/tab_close.png index fe8695c..d02ec42 100644 Binary files a/chrome/app/theme/tab_close.png and b/chrome/app/theme/tab_close.png differ diff --git a/chrome/app/theme/tab_close_mask.png b/chrome/app/theme/tab_close_mask.png deleted file mode 100644 index e7ad4c0..0000000 Binary files a/chrome/app/theme/tab_close_mask.png and /dev/null differ diff --git a/chrome/app/theme/theme_resources.grd b/chrome/app/theme/theme_resources.grd index 6a742fe..3e13670 100644 --- a/chrome/app/theme/theme_resources.grd +++ b/chrome/app/theme/theme_resources.grd @@ -57,7 +57,6 @@ - @@ -286,7 +285,6 @@ - diff --git a/chrome/browser/views/tabs/tab_renderer.cc b/chrome/browser/views/tabs/tab_renderer.cc index 1f428521..2b29341 100644 --- a/chrome/browser/views/tabs/tab_renderer.cc +++ b/chrome/browser/views/tabs/tab_renderer.cc @@ -54,7 +54,6 @@ static const double kHoverOpacity = 0.33; static gfx::Font* title_font = NULL; static int title_font_height = 0; static SkBitmap* close_button_n = NULL; -static SkBitmap* close_button_m = NULL; static SkBitmap* close_button_h = NULL; static SkBitmap* close_button_p = NULL; static int close_button_height = 0; @@ -82,7 +81,6 @@ void InitResources() { title_font_height = title_font->height(); close_button_n = rb.GetBitmapNamed(IDR_TAB_CLOSE); - close_button_m = rb.GetBitmapNamed(IDR_TAB_CLOSE_MASK); close_button_h = rb.GetBitmapNamed(IDR_TAB_CLOSE_H); close_button_p = rb.GetBitmapNamed(IDR_TAB_CLOSE_P); close_button_width = close_button_n->width(); @@ -234,7 +232,6 @@ TabRenderer::TabRenderer() showing_icon_(false), showing_close_button_(false), fav_icon_hiding_offset_(0), - close_button_color_(NULL), crash_animation_(NULL), should_display_crashed_favicon_(false), theme_provider_(NULL) { @@ -484,18 +481,6 @@ void TabRenderer::Layout() { close_button_->SetBounds(lb.width() + kCloseButtonHorzFuzz, close_button_top, close_button_width, close_button_height); - - // If the close button color has changed, generate a new one. - SkColor tab_text_color = - GetThemeProvider()->GetColor(BrowserThemeProvider::COLOR_TAB_TEXT); - if (!close_button_color_ || tab_text_color != close_button_color_) { - close_button_color_ = tab_text_color; - ResourceBundle& rb = ResourceBundle::GetSharedInstance(); - close_button_->SetBackground(close_button_color_, - rb.GetBitmapNamed(IDR_TAB_CLOSE), - rb.GetBitmapNamed(IDR_TAB_CLOSE_MASK)); - } - close_button_->SetVisible(true); } else { close_button_->SetBounds(0, 0, 0, 0); diff --git a/chrome/browser/views/tabs/tab_renderer.h b/chrome/browser/views/tabs/tab_renderer.h index d157ceb..ea29a43 100644 --- a/chrome/browser/views/tabs/tab_renderer.h +++ b/chrome/browser/views/tabs/tab_renderer.h @@ -198,9 +198,6 @@ class TabRenderer : public views::View, // The offset used to animate the favicon location. int fav_icon_hiding_offset_; - // The current color of the close button. - SkColor close_button_color_; - // The animation object used to swap the favicon with the sad tab icon. class FavIconCrashAnimation; FavIconCrashAnimation* crash_animation_; @@ -215,4 +212,4 @@ class TabRenderer : public views::View, DISALLOW_EVIL_CONSTRUCTORS(TabRenderer); }; -#endif // CHROME_BROWSER_VIEWS_TABS_TAB_RENDERER_H__ +#endif // CHROME_BROWSER_VIEWS_TABS_TAB_RENDERER_H__ \ No newline at end of file -- cgit v1.1