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

Unified Diff: chrome/browser/gtk/download_item_gtk.h

Issue 155365: GTK Themes: Set bg/text colors for the download manager. (Closed)
Patch Set: Created 11 years, 5 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/gtk/browser_window_gtk.cc ('k') | chrome/browser/gtk/download_item_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/download_item_gtk.h
diff --git a/chrome/browser/gtk/download_item_gtk.h b/chrome/browser/gtk/download_item_gtk.h
index 832302e29455816eb8b1ce6c5a0025add6d22244..bae5cbd2ecc4529615e49b040a0ae040993475e0 100644
--- a/chrome/browser/gtk/download_item_gtk.h
+++ b/chrome/browser/gtk/download_item_gtk.h
@@ -16,6 +16,7 @@
class BaseDownloadItemModel;
class DownloadShelfContextMenuGtk;
class DownloadShelfGtk;
+class GtkThemeProperties;
class NineBox;
class SkBitmap;
class SlideAnimation;
@@ -37,6 +38,9 @@ class DownloadItemGtk : public DownloadItem::Observer,
// AnimationDelegate implementation.
virtual void AnimationProgressed(const Animation* animation);
+ // Changes the color of the background shelf.
+ void UserChangedTheme(GtkThemeProperties* properties);
+
// Called when the icon manager has finished loading the icon. We take
// ownership of |icon_bitmap|.
void OnLoadIconComplete(IconManager::Handle handle, SkBitmap* icon_bitmap);
@@ -62,6 +66,13 @@ class DownloadItemGtk : public DownloadItem::Observer,
// Ask the icon manager to asynchronously start loading the icon for the file.
void LoadIcon();
+ // Sets the name label to the correct color.
+ void UpdateNameLabel();
+
+ // Sets the text with the correct color if |status_label| exists.
+ void UpdateStatusLabel(GtkWidget* status_label,
+ const std::string& status_text);
+
static void InitNineBoxes();
// Used for the download item's body and menu button.
@@ -121,6 +132,9 @@ class DownloadItemGtk : public DownloadItem::Observer,
// The GtkLabel that holds the status text.
GtkWidget* status_label_;
+ // The current text of status label
+ std::string status_text_;
+
// The widget that creates a dropdown menu when pressed.
GtkWidget* menu_button_;
@@ -128,6 +142,9 @@ class DownloadItemGtk : public DownloadItem::Observer,
// draw the button.
bool menu_showing_;
+ // Whether we should use the GTK text color
+ bool use_gtk_colors_;
+
// The widget that contains the animation progress and the file's icon
// (as well as the complete animation).
OwnedWidgetGtk progress_area_;
« no previous file with comments | « chrome/browser/gtk/browser_window_gtk.cc ('k') | chrome/browser/gtk/download_item_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698