Skip to content

Commit

Permalink
Merge pull request #1875 from cwensley/curtis/wkwebview-print-margins
Browse files Browse the repository at this point in the history
Mac: Use proper print margins for WKWebView
  • Loading branch information
cwensley authored Jan 10, 2021
2 parents 32703b9 + 8be7d55 commit 0538f40
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Eto.Mac/Forms/Controls/WKWebViewHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,15 @@ public void LoadHtml(string html, Uri baseUri)

public void ShowPrintDialog()
{
var printInfo = NSPrintInfo.SharedPrintInfo;
const float margin = 24f;
var printInfo = new NSPrintInfo
{
VerticallyCentered = false,
LeftMargin = margin,
RightMargin = margin,
TopMargin = margin,
BottomMargin = margin
};
NSPrintOperation printOperation = null;

if (Control.RespondsToSelector(s_selGetPrintOperation))
Expand Down

0 comments on commit 0538f40

Please sign in to comment.