From 4d3bb036f907150cb2954709012bfac4232f7676 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 21 May 2022 00:08:11 +0100 Subject: [PATCH] Use GetDefaultBorderFractional() for borders in wxPreviewFrame This is slightly more precise when using non-integral scaling factor than using GetDefaultBorder(). --- src/common/prntbase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 6c40dd5ae5..43c91a5504 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -1500,7 +1500,7 @@ public: { m_needsSeparator = false; - m_sizer->AddSpacer(2*wxSizerFlags::GetDefaultBorder()); + m_sizer->AddSpacer(wxRound(2*wxSizerFlags::GetDefaultBorderFractional())); } m_hasContents = true; @@ -1868,7 +1868,7 @@ void wxPrintPreviewBase::Init(wxPrintout *printout, m_currentPage = 1; m_currentZoom = 70; m_topMargin = - m_leftMargin = 2*wxSizerFlags::GetDefaultBorder(); + m_leftMargin = wxRound(2*wxSizerFlags::GetDefaultBorderFractional()); m_pageWidth = 0; m_pageHeight = 0; m_printingPrepared = false;