Chromium Code Reviews

Unified Diff: views/controls/tabbed_pane/native_tabbed_pane_gtk.cc

Issue 235012: Set background to tabbed pane's content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/tabbed_pane/native_tabbed_pane_gtk.cc
===================================================================
--- views/controls/tabbed_pane/native_tabbed_pane_gtk.cc (revision 27015)
+++ views/controls/tabbed_pane/native_tabbed_pane_gtk.cc (working copy)
@@ -12,6 +12,8 @@
#include "base/logging.h"
#include "base/stl_util-inl.h"
#include "base/string_util.h"
+#include "skia/ext/skia_utils_gtk.h"
+#include "views/background.h"
#include "views/controls/tabbed_pane/tabbed_pane.h"
#include "views/fill_layout.h"
#include "views/widget/root_view.h"
@@ -129,6 +131,14 @@
page_container->SetContentsView(contents);
page_container->Show();
+ if (!contents->background()) {
+ GtkStyle* window_style =
+ gtk_widget_get_style(page_container->GetNativeView());
+ contents->set_background(
+ Background::CreateSolidBackground(
+ skia::GdkColorToSkColor(window_style->bg[GTK_STATE_NORMAL])));
+ }
+
GtkWidget* page = page_container->GetNativeView();
// increment ref count not to delete on remove below
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine