[Libreoffice-commits] core.git: vcl/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Tue May 21 13:42:04 UTC 2019
vcl/source/window/menubarwindow.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit a2da909adfe07d5a093485cc28283f5c100946ba
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue May 21 12:27:17 2019 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue May 21 15:40:49 2019 +0200
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 at collabora.com>
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);
}
More information about the Libreoffice-commits
mailing list