Fix bug about PrintPreviewDialog

This commit is contained in:
haru-s 2024-03-04 19:53:53 +09:00
parent 38b9f0f05a
commit 3d9fc4aee3

View file

@ -2577,7 +2577,7 @@ class PreviewPrintController : PrintController
_pageGraphics.drawText(currentPageString, font, Color.black, Rect(0, 0, 1000, 1000));
// Draw the main image.
const Rect screenRect = Rect(0, 0, _pageGraphics.width, _pageGraphics.height);
const Rect screenRect = Rect(0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); // NOTE: Gets MemoryGraphics size as the background DC.
const Rect paperRect = _toRect(document.printerSettings.defaultPageSettings);
const uint row = (e.currentPage - _previewControl.startPage - 1) % _previewControl.rows;
const uint col = (e.currentPage - _previewControl.startPage - 1) / _previewControl.rows;