summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKshitij Pathania <kshitijpathania@gmail.com>2018-05-31 14:35:32 +0530
committerSzymon Kłos <szymon.klos@collabora.com>2018-07-06 12:42:32 +0200
commit4b848a51e9b8bc59aeb327d5c8349a29b26c31dc (patch)
treec4fa8a5edb4346a5d75c55d2d50b7d6d9a938180
parent1a72ccd57909bf795fe60fafbdcb7ed5566d61cc (diff)
tdf#107266 made background continous for menubar and notebookbar
Change-Id: Ieed538741f2a252c8acf1e751bb2ddbe6361b2fa Reviewed-on: https://gerrit.libreoffice.org/55118 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Szymon Kłos <szymon.klos@collabora.com> (cherry picked from commit 09cc173d59c0b79dca1ea11b37c858e8716062d3) Reviewed-on: https://gerrit.libreoffice.org/56991 Tested-by: Jenkins
-rw-r--r--vcl/source/window/brdwin.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 594b7471d038..c28b6ff4cd5a 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1781,6 +1781,21 @@ void ImplBorderWindow::Resize()
if (mpNotebookBar)
{
long nNotebookBarHeight = mpNotebookBar->GetSizePixel().Height();
+
+ const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+ const BitmapEx aPersona = rStyleSettings.GetPersonaHeader();
+ // since size of notebookbar changes, to make common persona for menubar
+ // and notebookbar persona should be set again with changed coordinates
+ if (!aPersona.IsEmpty())
+ {
+ Wallpaper aWallpaper(aPersona);
+ aWallpaper.SetStyle(WallpaperStyle::TopRight);
+ aWallpaper.SetRect(tools::Rectangle(Point(0, -nTopBorder),
+ Size(aSize.Width() - nLeftBorder - nRightBorder,
+ nNotebookBarHeight + nTopBorder)));
+ mpNotebookBar->SetBackground(aWallpaper);
+ }
+
mpNotebookBar->setPosSizePixel(
nLeftBorder, nTopBorder,
aSize.Width() - nLeftBorder - nRightBorder,