Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Unified Diff: chrome/browser/views/download_shelf_view.cc

Issue 165372: Merge 22980 - Mask the close button on the download shelf so that it's visibl... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/download_shelf_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/download_shelf_view.cc
===================================================================
--- chrome/browser/views/download_shelf_view.cc (revision 23158)
+++ chrome/browser/views/download_shelf_view.cc (working copy)
@@ -72,7 +72,8 @@
} // namespace
DownloadShelfView::DownloadShelfView(Browser* browser, BrowserView* parent)
- : browser_(browser), parent_(parent) {
+ : browser_(browser),
+ parent_(parent) {
parent->AddChildView(this);
Init();
}
@@ -99,6 +100,7 @@
rb.GetBitmapNamed(IDR_CLOSE_BAR_H));
close_button_->SetImage(views::CustomButton::BS_PUSHED,
rb.GetBitmapNamed(IDR_CLOSE_BAR_P));
+ UpdateButtonColors();
AddChildView(close_button_);
new_item_animation_.reset(new SlideAnimation(this));
@@ -284,6 +286,20 @@
return item_size.width() < available_width;
}
+void DownloadShelfView::UpdateButtonColors() {
+ ResourceBundle& rb = ResourceBundle::GetSharedInstance();
+ if (GetThemeProvider()) {
+ close_button_->SetBackground(
+ GetThemeProvider()->GetColor(BrowserThemeProvider::COLOR_TAB_TEXT),
+ rb.GetBitmapNamed(IDR_CLOSE_BAR),
+ rb.GetBitmapNamed(IDR_CLOSE_BAR_MASK));
+ }
+}
+
+void DownloadShelfView::ThemeChanged() {
+ UpdateButtonColors();
+}
+
void DownloadShelfView::LinkActivated(views::Link* source, int event_flags) {
browser_->ShowDownloadsTab();
}
Property changes on: chrome\browser\views\download_shelf_view.cc
___________________________________________________________________
Modified: svn:mergeinfo
Merged /trunk/src/chrome/browser/views/download_shelf_view.cc:r22980
« no previous file with comments | « chrome/browser/views/download_shelf_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698