summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-25 00:37:26 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-25 00:37:26 +0000
commit03c31cb6187af91702b6c601fb3ca1bf0f5eb5f9 (patch)
tree83a8f012a7c2db02d466d91695c159499d53a0ca /views
parentd07a48f06c364c187049b04278a7b242cff5d5de (diff)
downloadchromium_src-03c31cb6187af91702b6c601fb3ca1bf0f5eb5f9.zip
chromium_src-03c31cb6187af91702b6c601fb3ca1bf0f5eb5f9.tar.gz
chromium_src-03c31cb6187af91702b6c601fb3ca1bf0f5eb5f9.tar.bz2
Set background to tabbed pane's content.
BUG=none TEST=none Review URL: http://codereview.chromium.org/235012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27157 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/controls/tabbed_pane/native_tabbed_pane_gtk.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/views/controls/tabbed_pane/native_tabbed_pane_gtk.cc b/views/controls/tabbed_pane/native_tabbed_pane_gtk.cc
index 3a454fe..6516c42 100644
--- a/views/controls/tabbed_pane/native_tabbed_pane_gtk.cc
+++ b/views/controls/tabbed_pane/native_tabbed_pane_gtk.cc
@@ -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 @@ void NativeTabbedPaneGtk::DoAddTabAtIndex(int index, const std::wstring& title,
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