diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-05-21 12:27:17 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-05-21 15:40:49 +0200 |
commit | a2da909adfe07d5a093485cc28283f5c100946ba (patch) | |
tree | 22f746e394d456d704d3e51456f1559fbbd62ed9 | |
parent | 478e051f4ea13b15120fdf74faf94a6c2cfcb50c (diff) |
tdf#125413 vcl menu bar window: fix non-NWF background
Windows (by default) and gtk3 paints its own background, but e.g. the
Linux gen backend does not; so make sure that we not only copy from the
buffer, but also initialize it.
This restores the gradient background of the main menu with the Linux
gen backend.
Change-Id: I5ce8cc734f64bc1d57d343caf22071e6aa63a69f
Reviewed-on: https://gerrit.libreoffice.org/72676
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r-- | vcl/source/window/menubarwindow.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index 0b838b02d49d..725de0794043 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -916,6 +916,9 @@ void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Recta // Make sure that all actual rendering happens in one go to avoid flicker. ScopedVclPtrInstance<VirtualDevice> pBuffer; pBuffer->SetOutputSizePixel(aOutputSize, false); + // Copy the current state to the buffer. + pBuffer->DrawOutDev(Point(0, 0), GetOutputSizePixel(), Point(0, 0), GetOutputSizePixel(), + rRenderContext); if (rRenderContext.IsNativeControlSupported(ControlType::Menubar, ControlPart::Entire)) { @@ -959,6 +962,7 @@ void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Recta pBuffer->Pop(); } + // Copy the current state from the buffer. rRenderContext.DrawOutDev(Point(0, 0), GetOutputSizePixel(), Point(0, 0), GetOutputSizePixel(), *pBuffer); } |