diff options
Diffstat (limited to 'chrome/browser/gtk/bookmark_bar_gtk.cc')
-rw-r--r-- | chrome/browser/gtk/bookmark_bar_gtk.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/gtk/bookmark_bar_gtk.cc b/chrome/browser/gtk/bookmark_bar_gtk.cc index 45cd4e0..eb16e2e 100644 --- a/chrome/browser/gtk/bookmark_bar_gtk.cc +++ b/chrome/browser/gtk/bookmark_bar_gtk.cc @@ -176,7 +176,8 @@ void BookmarkBarGtk::Init(Profile* profile) { g_signal_connect(instructions_, "drag-data-received", G_CALLBACK(&OnDragReceived), this); - gtk_widget_set_app_paintable(widget(), TRUE); + // Only paint in chrome theme mode. + gtk_widget_set_app_paintable(widget(), !theme_provider_->UseGtkTheme()); g_signal_connect(G_OBJECT(widget()), "expose-event", G_CALLBACK(&OnEventBoxExpose), this); @@ -489,6 +490,9 @@ void BookmarkBarGtk::Observe(NotificationType type, << "don't have a BookmarkModel. Taking no action."; } + // When using the GTK+ theme, let GTK optimize the background drawing. + gtk_widget_set_app_paintable(widget(), !theme_provider_->UseGtkTheme()); + // 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. @@ -891,6 +895,10 @@ void BookmarkBarGtk::OnDragReceived(GtkWidget* widget, gboolean BookmarkBarGtk::OnEventBoxExpose(GtkWidget* widget, GdkEventExpose* event, BookmarkBarGtk* bar) { + // We don't need to render the toolbar image in GTK mode. + if (bar->theme_provider_->UseGtkTheme()) + return FALSE; + // Paint the background theme image. cairo_t* cr = gdk_cairo_create(GDK_DRAWABLE(widget->window)); cairo_rectangle(cr, event->area.x, event->area.y, |