diff options
author | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-21 17:47:01 +0000 |
---|---|---|
committer | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-21 17:47:01 +0000 |
commit | b96f34ad357b1639f382c3764d9426efec4b2a52 (patch) | |
tree | 5b81b22737f0fac98bb260c886f67d4a809b71c0 /views/controls | |
parent | 145c762733827644c5e871c4357f6760f9a1a21e (diff) | |
download | chromium_src-b96f34ad357b1639f382c3764d9426efec4b2a52.zip chromium_src-b96f34ad357b1639f382c3764d9426efec4b2a52.tar.gz chromium_src-b96f34ad357b1639f382c3764d9426efec4b2a52.tar.bz2 |
Polish ChromeOS options dialog:
- Add a chromeos OptionsWindowView that hosts options pages in a ChromeWindow
so that it has a frame; This piece of code is based on Chrome's
OptionsWindowView. Ideally, we should use Chrome's options view but
we still missing underlying controls such as Tree and Table.
- Use last active browser window as options dialog's parent;
This makes optiosn dialog transient for the browser window and window
manager will no longer treat it as top-level window and will not move
and resize it;
- If user switches to a new browser window and invokes options dialog again,
close the existing one and re-opens it for the current browser window.
This is currently supported by window manager;
- Update CustomerFrameView and WindowDelegate to make client edge optionaly;
Options dialog has no client area padding and does not have a client
edge per UI mock;
- Make NativeViewHost respects its background. This solves the problem that
tab pane background is not properly cleared when hosting a native GtkVBox
pane in TabbedPane;
BUG=<http://crosbug.com/1885>
TEST=Verify ChromeOS settings dialog looks like the mocks in http://www.chromium.org/chromium-os/user-experience/settings
Review URL: http://codereview.chromium.org/1672003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45204 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls')
-rw-r--r-- | views/controls/native/native_view_host.cc | 10 | ||||
-rw-r--r-- | views/controls/tabbed_pane/tabbed_pane.h | 4 |
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. |