summaryrefslogtreecommitdiffstats
path: root/views/controls
diff options
context:
space:
mode:
Diffstat (limited to 'views/controls')
-rw-r--r--views/controls/native/native_view_host.cc10
-rw-r--r--views/controls/tabbed_pane/tabbed_pane.h4
2 files changed, 14 insertions, 0 deletions
diff --git a/views/controls/native/native_view_host.cc b/views/controls/native/native_view_host.cc
index bf6dd7f..91f34c1 100644
--- a/views/controls/native/native_view_host.cc
+++ b/views/controls/native/native_view_host.cc
@@ -113,6 +113,16 @@ void NativeViewHost::Layout() {
}
void NativeViewHost::Paint(gfx::Canvas* canvas) {
+ // Paint background if there is one. NativeViewHost needs to paint
+ // a background when it is hosted in a TabbedPane. For Gtk implementation,
+ // NativeTabbedPaneGtk uses a WidgetGtk as page container and because
+ // WidgetGtk hook "expose" with its root view's paint, we need to
+ // fill the content. Otherwise, the tab page's background is not properly
+ // cleared. For Windows case, it appears okay to not paint background because
+ // we don't have a container window in-between. However if you want to use
+ // customized background, then this becomes necessary.
+ PaintBackground(canvas);
+
// The area behind our window is black, so during a fast resize (where our
// content doesn't draw over the full size of our native view, and the native
// view background color doesn't show up), we need to cover that blackness
diff --git a/views/controls/tabbed_pane/tabbed_pane.h b/views/controls/tabbed_pane/tabbed_pane.h
index abbb9fa..2fe503e 100644
--- a/views/controls/tabbed_pane/tabbed_pane.h
+++ b/views/controls/tabbed_pane/tabbed_pane.h
@@ -73,6 +73,10 @@ class TabbedPane : public View {
virtual void PaintFocusBorder(gfx::Canvas* canvas);
virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
+ NativeTabbedPaneWrapper* native_wrapper() const {
+ return native_tabbed_pane_;
+ }
+
protected:
// The object that actually implements the tabbed-pane.
// Protected for tests access.