Skip to content

Commit

Permalink
Mac: Use proper print margins for WKWebView
Browse files Browse the repository at this point in the history
  • Loading branch information
cwensley committed Jan 10, 2021
1 parent 3eedb27 commit 8be7d55
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 @@ -299,7 +299,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 8be7d55

Please sign in to comment.