Kaydet (Commit) a2da909a authored tarafından Miklos Vajna's avatar Miklos Vajna

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: 's avatarMiklos Vajna <vmiklos@collabora.com>
üst 478e051f
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment