summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-16 21:51:02 +0900
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-16 21:59:42 +0900
commit71ede9d1f9eb493fcabfc8238b88354856413b8d (patch)
tree4d4b67e8c0c4ae3c319d7c55160dbf406f1b98a4
parent7de50fd4b37a2280d08ce6e3b0b03c227a5d315e (diff)
menu: remember old Background and restore later
Change-Id: I1c2bc60729117ea0a4e03a231b4dcce083ecf959
-rw-r--r--vcl/source/window/menu.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 0f600bc84d02..7a32856e920c 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1765,6 +1765,8 @@ void Menu::ImplPaintMenuTitle(vcl::RenderContext& rRenderContext, const Rectangl
{
// Save previous graphical settings, set new one
rRenderContext.Push(PushFlags::FONT | PushFlags::FILLCOLOR);
+ Wallpaper aOldBackground = rRenderContext.GetBackground();
+
Color aBackgroundColor = rRenderContext.GetSettings().GetStyleSettings().GetMenuBarColor();
rRenderContext.SetBackground(Wallpaper(aBackgroundColor));
rRenderContext.SetFillColor(aBackgroundColor);
@@ -1789,8 +1791,8 @@ void Menu::ImplPaintMenuTitle(vcl::RenderContext& rRenderContext, const Rectangl
rRenderContext.DrawText(aTextTopLeft, aTitleText, 0, aTitleText.getLength());
// Restore
- rRenderContext.SetBackground();
rRenderContext.Pop();
+ rRenderContext.SetBackground(aOldBackground);
}
void Menu::ImplPaint(vcl::RenderContext& rRenderContext,