Add wxHtmlPrintout::SetMargins(wxPageSetupDialogData) overload
Make it simpler to set the user-configured margins. Closes #16872.
This commit is contained in:
committed by
Vadim Zeitlin
parent
10a2049093
commit
c9a3a23e5a
@@ -593,8 +593,13 @@ void wxHtmlPrintout::SetMargins(float top, float bottom, float left, float right
|
||||
m_MarginSpace = spaces;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxHtmlPrintout::SetMargins(const wxPageSetupDialogData& pageSetupData)
|
||||
{
|
||||
SetMargins(pageSetupData.GetMarginTopLeft().y,
|
||||
pageSetupData.GetMarginBottomRight().y,
|
||||
pageSetupData.GetMarginTopLeft().x,
|
||||
pageSetupData.GetMarginBottomRight().x);
|
||||
}
|
||||
|
||||
void wxHtmlPrintout::SetFonts(const wxString& normal_face, const wxString& fixed_face,
|
||||
const int *sizes)
|
||||
@@ -818,10 +823,7 @@ wxHtmlPrintout *wxHtmlEasyPrinting::CreatePrintout()
|
||||
p->SetFooter(m_Footers[0], wxPAGE_EVEN);
|
||||
p->SetFooter(m_Footers[1], wxPAGE_ODD);
|
||||
|
||||
p->SetMargins(m_PageSetupData->GetMarginTopLeft().y,
|
||||
m_PageSetupData->GetMarginBottomRight().y,
|
||||
m_PageSetupData->GetMarginTopLeft().x,
|
||||
m_PageSetupData->GetMarginBottomRight().x);
|
||||
p->SetMargins(*m_PageSetupData);
|
||||
|
||||
return p;
|
||||
}
|
||||
|
Reference in New Issue
Block a user