diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-22 15:39:17 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-22 15:39:17 +0000 |
commit | 9c0c5d1ddcc14119336ce61f7b22fec4ce3ee694 (patch) | |
tree | f608150471f9c99f7b895efeefc4a29cb7494789 /ui | |
parent | 2200e6d498a82fad8af88b4d9a7235010473d14a (diff) | |
download | chromium_src-9c0c5d1ddcc14119336ce61f7b22fec4ce3ee694.zip chromium_src-9c0c5d1ddcc14119336ce61f7b22fec4ce3ee694.tar.gz chromium_src-9c0c5d1ddcc14119336ce61f7b22fec4ce3ee694.tar.bz2 |
linux_aura: Three fixes for switching themes.
Native system theming was badly hacked into ThemeService with ifdefs. This
correlates the code into its own file, which should be conditionally compiled
out.
When doing any switching of themes, we weren't notifying the non client view of
the change.
Make the options page in the linux_aura port behave the same way as in the GTK+
port.
BUG=130810
Review URL: https://chromiumcodereview.appspot.com/17494005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208060 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/linux_ui/linux_ui.h | 5 | ||||
-rw-r--r-- | ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/ui/linux_ui/linux_ui.h b/ui/linux_ui/linux_ui.h index 85decc8..1f58e11 100644 --- a/ui/linux_ui/linux_ui.h +++ b/ui/linux_ui/linux_ui.h @@ -47,10 +47,15 @@ class LINUX_UI_EXPORT LinuxUI : public LinuxShellDialog { virtual bool UseNativeTheme() const = 0; virtual gfx::Image GetThemeImageNamed(int id) const = 0; virtual bool GetColor(int id, SkColor* color) const = 0; + virtual bool HasCustomImage(int id) const = 0; // Returns a NativeTheme that will provide system colors and draw system // style widgets. virtual NativeTheme* GetNativeTheme() const = 0; + + // Returns whether we should be using the native theme provided by this + // object by default. + virtual bool GetDefaultUsesSystemTheme() const = 0; }; } // namespace ui diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc index ea98a9c..78d3e9d 100644 --- a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc +++ b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc @@ -619,6 +619,10 @@ bool DesktopRootWindowHostX11::ShouldUseNativeFrame() { } void DesktopRootWindowHostX11::FrameTypeChanged() { + // Replace the frame and layout the contents. Even though we don't have a + // swapable glass frame like on Windows, we still replace the frame because + // the button assets don't update otherwise. + native_widget_delegate_->AsWidget()->non_client_view()->UpdateFrame(true); } NonClientFrameView* DesktopRootWindowHostX11::CreateNonClientFrameView() { |