eeschema: Temporary fix for GTK printing offset

The full fix will be Cairo printing in v6

Fixes https://gitlab.com/kicad/code/kicad/issues/1907
This commit is contained in:
Seth Hillbrand 2020-02-04 11:25:12 -06:00
parent ce4542cced
commit 134a7ba85d
1 changed files with 16 additions and 0 deletions

View File

@ -371,7 +371,23 @@ void SCH_PRINTOUT::PrintPage( SCH_SCREEN* aScreen )
bool printReference = m_parent->GetPrintSheetReference(); bool printReference = m_parent->GetPrintSheetReference();
pageSizeIU = aScreen->GetPageSettings().GetSizeIU(); pageSizeIU = aScreen->GetPageSettings().GetSizeIU();
#ifdef __WXGTK__
if( pageSizeIU.x > pageSizeIU.y )
{
auto psd = m_parent->GetPageSetupData();
psd.SetMarginTopLeft( wxPoint( 0, 3 ) );
psd.SetMarginBottomRight( wxPoint( 0, 5 ) );
FitThisSizeToPageMargins( pageSizeIU, psd );
}
else
{
FitThisSizeToPaper( pageSizeIU );
}
#else
FitThisSizeToPaper( pageSizeIU ); FitThisSizeToPaper( pageSizeIU );
#endif
fitRect = GetLogicalPaperRect(); fitRect = GetLogicalPaperRect();
wxLogDebug( wxT( "Fit rectangle: x = %d, y = %d, w = %d, h = %d" ), wxLogDebug( wxT( "Fit rectangle: x = %d, y = %d, w = %d, h = %d" ),