diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-28 02:31:23 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-28 02:31:23 +0000 |
commit | 868d12187e2e797a501344925876bdfe05e08034 (patch) | |
tree | e671a327e193a8e41b11efa717fda0851b323020 | |
parent | 929dbb7ccd482f8b1cab24fa3a0534f319ed04ea (diff) | |
download | chromium_src-868d12187e2e797a501344925876bdfe05e08034.zip chromium_src-868d12187e2e797a501344925876bdfe05e08034.tar.gz chromium_src-868d12187e2e797a501344925876bdfe05e08034.tar.bz2 |
gtk: Call UsingNativeTheme() instead of UseGtkTheme on ui/gtk/bookmarks.
(Note: This a TODO for akalin).
BUG=None
TEST=None
R=akalin@chromium.org,evan@chromium.org
Review URL: http://codereview.chromium.org/6905086
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83287 0039d316-1c4b-4281-b951-d872f2087c98
4 files changed, 18 insertions, 17 deletions
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc index 551aa46..4f90f34 100644 --- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc +++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc @@ -316,7 +316,7 @@ void BookmarkBarGtk::Show(bool animate) { // Hide out behind the findbar. This is rather fragile code, it could // probably be improved. if (floating_) { - if (theme_service_->UseGtkTheme()) { + if (theme_service_->UsingNativeTheme()) { if (GTK_WIDGET_REALIZED(event_box_->parent)) gdk_window_lower(event_box_->parent->window); if (GTK_WIDGET_REALIZED(event_box_.get())) @@ -577,7 +577,7 @@ void BookmarkBarGtk::SetOverflowButtonAppearance() { if (former_child) gtk_widget_destroy(former_child); - GtkWidget* new_child = theme_service_->UseGtkTheme() ? + GtkWidget* new_child = theme_service_->UsingNativeTheme() ? gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_NONE) : gtk_image_new_from_pixbuf(ResourceBundle::GetSharedInstance(). GetRTLEnabledPixbufNamed(IDR_BOOKMARK_BAR_CHEVRONS)); @@ -644,7 +644,7 @@ void BookmarkBarGtk::UpdateFloatingState() { #if !defined(OS_CHROMEOS) gtk_event_box_set_visible_window(GTK_EVENT_BOX(paint_box_), TRUE); #endif - GdkColor stroke_color = theme_service_->UseGtkTheme() ? + GdkColor stroke_color = theme_service_->UsingNativeTheme() ? theme_service_->GetBorderColor() : theme_service_->GetGdkColor(ThemeService::COLOR_NTP_HEADER); gtk_util::ActAsRoundedWindow(paint_box_, stroke_color, kNTPRoundedness, @@ -682,15 +682,15 @@ void BookmarkBarGtk::UpdateFloatingState() { } void BookmarkBarGtk::UpdateEventBoxPaintability() { - gtk_widget_set_app_paintable(event_box_.get(), - !theme_service_->UseGtkTheme() || floating_); + gtk_widget_set_app_paintable( + event_box_.get(), !theme_service_->UsingNativeTheme() || floating_); // When using the GTK+ theme, we need to have the event box be visible so // buttons don't get a halo color from the background. When using Chromium // themes, we want to let the background show through the toolbar. #if !defined(OS_CHROMEOS) gtk_event_box_set_visible_window(GTK_EVENT_BOX(event_box_.get()), - theme_service_->UseGtkTheme()); + theme_service_->UsingNativeTheme()); #endif } @@ -850,7 +850,7 @@ void BookmarkBarGtk::Observe(NotificationType type, gtk_widget_modify_bg(paint_box_, GTK_STATE_NORMAL, &paint_box_color); if (floating_) { - GdkColor stroke_color = theme_service_->UseGtkTheme() ? + GdkColor stroke_color = theme_service_->UsingNativeTheme() ? theme_service_->GetBorderColor() : theme_service_->GetGdkColor(ThemeService::COLOR_NTP_HEADER); gtk_util::SetRoundedWindowBorderColor(paint_box_, stroke_color); @@ -1349,7 +1349,7 @@ gboolean BookmarkBarGtk::OnEventBoxExpose(GtkWidget* widget, // We don't need to render the toolbar image in GTK mode, except when // detached. - if (theme_provider->UseGtkTheme() && !floating_) + if (theme_provider->UsingNativeTheme() && !floating_) return FALSE; if (!floating_) { diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc index b763d5f..cad3b2b 100644 --- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc +++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc @@ -66,11 +66,11 @@ void BookmarkBarInstructionsGtk::OnButtonClick(GtkWidget* button) { void BookmarkBarInstructionsGtk::UpdateColors() { gtk_chrome_link_button_set_use_gtk_theme( GTK_CHROME_LINK_BUTTON(instructions_link_), - theme_service_->UseGtkTheme()); + theme_service_->UsingNativeTheme()); GdkColor bookmark_color = theme_service_->GetGdkColor( ThemeService::COLOR_BOOKMARK_TEXT); - if (theme_service_->UseGtkTheme()) { + if (theme_service_->UsingNativeTheme()) { gtk_util::SetLabelColor(instructions_label_, NULL); gtk_chrome_link_button_set_normal_color( GTK_CHROME_LINK_BUTTON(instructions_link_), NULL); diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc index 8a7a129..242af19 100644 --- a/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc +++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc @@ -65,9 +65,9 @@ void BookmarkBubbleGtk::Observe(NotificationType type, gtk_chrome_link_button_set_use_gtk_theme( GTK_CHROME_LINK_BUTTON(remove_button_), - theme_service_->UseGtkTheme()); + theme_service_->UsingNativeTheme()); - if (theme_service_->UseGtkTheme()) { + if (theme_service_->UsingNativeTheme()) { for (std::vector<GtkWidget*>::iterator it = labels_.begin(); it != labels_.end(); ++it) { gtk_widget_modify_fg(*it, GTK_STATE_NORMAL, NULL); diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc index 07d4a4a..f537a65 100644 --- a/chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc +++ b/chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc @@ -192,7 +192,7 @@ GtkWidget* GetDragRepresentation(GdkPixbuf* pixbuf, gtk_widget_set_size_request(window, kDragRepresentationWidth, base_font.GetHeight()); } else { - if (!provider->UseGtkTheme()) { + if (!provider->UsingNativeTheme()) { GdkColor color = provider->GetGdkColor( ThemeService::COLOR_TOOLBAR); gtk_widget_modify_bg(window, GTK_STATE_NORMAL, &color); @@ -215,7 +215,8 @@ GtkWidget* GetDragRepresentation(GdkPixbuf* pixbuf, GtkWidget* GetDragRepresentationForNode(const BookmarkNode* node, BookmarkModel* model, GtkThemeService* provider) { - GdkPixbuf* pixbuf = GetPixbufForNode(node, model, provider->UseGtkTheme()); + GdkPixbuf* pixbuf = GetPixbufForNode( + node, model, provider->UsingNativeTheme()); GtkWidget* widget = GetDragRepresentation(pixbuf, node->GetTitle(), provider); g_object_unref(pixbuf); return widget; @@ -223,8 +224,8 @@ GtkWidget* GetDragRepresentationForNode(const BookmarkNode* node, void ConfigureButtonForNode(const BookmarkNode* node, BookmarkModel* model, GtkWidget* button, GtkThemeService* provider) { - GdkPixbuf* pixbuf = bookmark_utils::GetPixbufForNode(node, model, - provider->UseGtkTheme()); + GdkPixbuf* pixbuf = bookmark_utils::GetPixbufForNode( + node, model, provider->UsingNativeTheme()); PackButton(pixbuf, node->GetTitle(), node != model->other_node(), provider, button); g_object_unref(pixbuf); @@ -250,7 +251,7 @@ const BookmarkNode* BookmarkNodeForWidget(GtkWidget* widget) { } void SetButtonTextColors(GtkWidget* label, GtkThemeService* provider) { - if (provider->UseGtkTheme()) { + if (provider->UsingNativeTheme()) { gtk_util::SetLabelColor(label, NULL); } else { GdkColor color = provider->GetGdkColor( |