diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-20 12:26:55 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-20 19:44:24 +0900 |
commit | e497141d9a31a05b67c2416ae5f40838fb748def (patch) | |
tree | c3a1c6d6183fd9dcb4dc0a760f55101c12ceff9f /sfx2 | |
parent | 5f8b294bcc2ed1c518d8a07f257ee772cde37363 (diff) |
sidebar Panel - setup background in ApplySettings
Change-Id: I89ea754dbbb64e535ca719af4e7d949ac117df0a
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/sidebar/Panel.cxx | 9 | ||||
-rw-r--r-- | sfx2/source/sidebar/Panel.hxx | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/sfx2/source/sidebar/Panel.cxx b/sfx2/source/sidebar/Panel.cxx index 07b1790b7eaf..7ea2689bb205 100644 --- a/sfx2/source/sidebar/Panel.cxx +++ b/sfx2/source/sidebar/Panel.cxx @@ -58,8 +58,6 @@ Panel::Panel(const PanelDescriptor& rPanelDescriptor, , maDeckLayoutTrigger(rDeckLayoutTrigger) , maContextAccess(rContextAccess) { - SetBackground(Theme::GetPaint(Theme::Paint_PanelBackground).GetWallpaper()); - #ifdef DEBUG SetText(OUString("Panel")); #endif @@ -70,6 +68,11 @@ Panel::~Panel() disposeOnce(); } +void Panel::ApplySettings(vcl::RenderContext& rRenderContext) +{ + rRenderContext.SetBackground(Theme::GetPaint(Theme::Paint_PanelBackground).GetWallpaper()); +} + void Panel::dispose() { mxPanelComponent = NULL; @@ -155,7 +158,7 @@ void Panel::Activate() void Panel::DataChanged (const DataChangedEvent& rEvent) { (void)rEvent; - SetBackground(Theme::GetPaint(Theme::Paint_PanelBackground).GetWallpaper()); + Invalidate(); } Reference<awt::XWindow> Panel::GetElementWindow() diff --git a/sfx2/source/sidebar/Panel.hxx b/sfx2/source/sidebar/Panel.hxx index 2cfe520484cc..52e6e49018cf 100644 --- a/sfx2/source/sidebar/Panel.hxx +++ b/sfx2/source/sidebar/Panel.hxx @@ -58,6 +58,7 @@ public: virtual void Resize() SAL_OVERRIDE; virtual void DataChanged (const DataChangedEvent& rEvent) SAL_OVERRIDE; virtual void Activate() SAL_OVERRIDE; + virtual void ApplySettings(vcl::RenderContext& rRenderContext) SAL_OVERRIDE; private: const OUString msPanelId; |