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,
, 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()
......
......@@ -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;
......
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