Kaydet (Commit) e497141d authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

sidebar Panel - setup background in ApplySettings

Change-Id: I89ea754dbbb64e535ca719af4e7d949ac117df0a
üst 5f8b294b
...@@ -58,8 +58,6 @@ Panel::Panel(const PanelDescriptor& rPanelDescriptor, ...@@ -58,8 +58,6 @@ Panel::Panel(const PanelDescriptor& rPanelDescriptor,
, maDeckLayoutTrigger(rDeckLayoutTrigger) , maDeckLayoutTrigger(rDeckLayoutTrigger)
, maContextAccess(rContextAccess) , maContextAccess(rContextAccess)
{ {
SetBackground(Theme::GetPaint(Theme::Paint_PanelBackground).GetWallpaper());
#ifdef DEBUG #ifdef DEBUG
SetText(OUString("Panel")); SetText(OUString("Panel"));
#endif #endif
...@@ -70,6 +68,11 @@ Panel::~Panel() ...@@ -70,6 +68,11 @@ Panel::~Panel()
disposeOnce(); disposeOnce();
} }
void Panel::ApplySettings(vcl::RenderContext& rRenderContext)
{
rRenderContext.SetBackground(Theme::GetPaint(Theme::Paint_PanelBackground).GetWallpaper());
}
void Panel::dispose() void Panel::dispose()
{ {
mxPanelComponent = NULL; mxPanelComponent = NULL;
...@@ -155,7 +158,7 @@ void Panel::Activate() ...@@ -155,7 +158,7 @@ void Panel::Activate()
void Panel::DataChanged (const DataChangedEvent& rEvent) void Panel::DataChanged (const DataChangedEvent& rEvent)
{ {
(void)rEvent; (void)rEvent;
SetBackground(Theme::GetPaint(Theme::Paint_PanelBackground).GetWallpaper()); Invalidate();
} }
Reference<awt::XWindow> Panel::GetElementWindow() Reference<awt::XWindow> Panel::GetElementWindow()
......
...@@ -58,6 +58,7 @@ public: ...@@ -58,6 +58,7 @@ public:
virtual void Resize() SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE;
virtual void DataChanged (const DataChangedEvent& rEvent) SAL_OVERRIDE; virtual void DataChanged (const DataChangedEvent& rEvent) SAL_OVERRIDE;
virtual void Activate() SAL_OVERRIDE; virtual void Activate() SAL_OVERRIDE;
virtual void ApplySettings(vcl::RenderContext& rRenderContext) SAL_OVERRIDE;
private: private:
const OUString msPanelId; const OUString msPanelId;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment