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

Side by Side Diff: chrome/browser/gtk/download_shelf_gtk.cc

Issue 499004: Try 2: Completely redo how themes are stored on disk and processed at install time. (Closed)
Patch Set: Created 11 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/gtk/download_shelf_gtk.h" 5 #include "chrome/browser/gtk/download_shelf_gtk.h"
6 6
7 #include "app/gfx/gtk_util.h" 7 #include "app/gfx/gtk_util.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "chrome/browser/browser.h" 10 #include "chrome/browser/browser.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 gtk_widget_modify_bg(top_border_, GTK_STATE_NORMAL, &color); 194 gtk_widget_modify_bg(top_border_, GTK_STATE_NORMAL, &color);
195 195
196 gtk_chrome_link_button_set_use_gtk_theme( 196 gtk_chrome_link_button_set_use_gtk_theme(
197 GTK_CHROME_LINK_BUTTON(link_button_), theme_provider_->UseGtkTheme()); 197 GTK_CHROME_LINK_BUTTON(link_button_), theme_provider_->UseGtkTheme());
198 198
199 // When using a non-standard, non-gtk theme, we make the link color match 199 // When using a non-standard, non-gtk theme, we make the link color match
200 // the bookmark text color. Otherwise, standard link blue can look very 200 // the bookmark text color. Otherwise, standard link blue can look very
201 // bad for some dark themes. 201 // bad for some dark themes.
202 bool use_default_color = theme_provider_->GetColor( 202 bool use_default_color = theme_provider_->GetColor(
203 BrowserThemeProvider::COLOR_BOOKMARK_TEXT) == 203 BrowserThemeProvider::COLOR_BOOKMARK_TEXT) ==
204 BrowserThemeProvider::kDefaultColorBookmarkText; 204 BrowserThemeProvider::GetDefaultColor(
205 BrowserThemeProvider::COLOR_BOOKMARK_TEXT);
205 GdkColor bookmark_color = theme_provider_->GetGdkColor( 206 GdkColor bookmark_color = theme_provider_->GetGdkColor(
206 BrowserThemeProvider::COLOR_BOOKMARK_TEXT); 207 BrowserThemeProvider::COLOR_BOOKMARK_TEXT);
207 gtk_chrome_link_button_set_normal_color( 208 gtk_chrome_link_button_set_normal_color(
208 GTK_CHROME_LINK_BUTTON(link_button_), 209 GTK_CHROME_LINK_BUTTON(link_button_),
209 use_default_color ? NULL : &bookmark_color); 210 use_default_color ? NULL : &bookmark_color);
210 211
211 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 212 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
212 close_button_->SetBackground( 213 close_button_->SetBackground(
213 theme_provider_->GetColor(BrowserThemeProvider::COLOR_TAB_TEXT), 214 theme_provider_->GetColor(BrowserThemeProvider::COLOR_TAB_TEXT),
214 rb.GetBitmapNamed(IDR_CLOSE_BAR), 215 rb.GetBitmapNamed(IDR_CLOSE_BAR),
(...skipping 29 matching lines...) Expand all
244 // static 245 // static
245 void DownloadShelfGtk::OnButtonClick(GtkWidget* button, 246 void DownloadShelfGtk::OnButtonClick(GtkWidget* button,
246 DownloadShelfGtk* shelf) { 247 DownloadShelfGtk* shelf) {
247 if (button == shelf->close_button_->widget()) { 248 if (button == shelf->close_button_->widget()) {
248 shelf->Close(); 249 shelf->Close();
249 } else { 250 } else {
250 // The link button was clicked. 251 // The link button was clicked.
251 shelf->browser_->ShowDownloadsTab(); 252 shelf->browser_->ShowDownloadsTab();
252 } 253 }
253 } 254 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698