From 70f0900799b670107982d683cecf216453fc67fe Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 9 Aug 2019 23:28:53 +0200 Subject: [PATCH] Use white background when rendering print preview Explicitly use the white brush when erasing background of the bitmap used for print preview, to match the printed page appearance. Somehow it worked even without this under other platforms before, but logically resulted in black background under wxGTK 3. Closes https://github.com/wxWidgets/wxWidgets/pull/1476 Closes #18371. --- src/common/prntbase.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index dd52c006d8..3ee6ee2144 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -2054,6 +2054,7 @@ bool wxPrintPreviewBase::RenderPageIntoBitmap(wxBitmap& bmp, int pageNum) { wxMemoryDC memoryDC; memoryDC.SelectObject(bmp); + memoryDC.SetBackground(*wxWHITE_BRUSH); memoryDC.Clear(); return RenderPageIntoDC(memoryDC, pageNum);