summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/notebookbar.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/vcl/source/control/notebookbar.cxx b/vcl/source/control/notebookbar.cxx
index f23e2d57d21a..f338426aa23a 100644
--- a/vcl/source/control/notebookbar.cxx
+++ b/vcl/source/control/notebookbar.cxx
@@ -40,6 +40,8 @@ NotebookBar::NotebookBar(Window* pParent, const OString& rID, const OUString& rU
// In the Notebookbar's .ui file must exist control handling context
// - implementing NotebookbarContextControl interface with id "ContextContainer"
m_pContextContainer = dynamic_cast<NotebookbarContextControl*>(m_pUIBuilder->get<Window>("ContextContainer"));
+
+ UpdateBackground();
}
NotebookBar::~NotebookBar()
@@ -139,4 +141,23 @@ void SAL_CALL NotebookBarContextChangeEventListener::disposing(const ::css::lang
mpParent.clear();
}
+void NotebookBar::DataChanged(const DataChangedEvent& rDCEvt)
+{
+ UpdateBackground();
+ Control::DataChanged(rDCEvt);
+}
+
+void NotebookBar::UpdateBackground()
+{
+ const StyleSettings& rStyleSettings = this->GetSettings().GetStyleSettings();
+ const BitmapEx aPersona = rStyleSettings.GetPersonaHeader();
+
+ if (!aPersona.IsEmpty())
+ SetBackground(Wallpaper(aPersona));
+ else
+ SetBackground(rStyleSettings.GetMenuBarColor());
+
+ Invalidate(Rectangle(Point(0,0), GetSizePixel()));
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */