From c095a678a53dd6b17acb8f548926ee5339555507 Mon Sep 17 00:00:00 2001 From: John Jenkins Date: Mon, 26 Oct 2020 15:43:04 -0700 Subject: [PATCH] wpf: base margin height off Y dpi, not X dpi (#8039) This PR resolves an issue I observed in Microsoft.Terminal.Wpf.TerminalControl.CalculateMargins(). Specifically, on line 194 in the project. In this example, the line: `height = controlSize.Height - (this.TerminalRendererSize.Height / dpiScale.DpiScaleX);` is associating the height margin with dpiScale.DpiScaleX instead of dpiScale.DpiScaleY. This PR changes the association to DpiScaleY. Closes #8038 --- src/cascadia/WpfTerminalControl/TerminalControl.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cascadia/WpfTerminalControl/TerminalControl.xaml.cs b/src/cascadia/WpfTerminalControl/TerminalControl.xaml.cs index 62ec5cc4497..87c2df25a06 100644 --- a/src/cascadia/WpfTerminalControl/TerminalControl.xaml.cs +++ b/src/cascadia/WpfTerminalControl/TerminalControl.xaml.cs @@ -191,7 +191,7 @@ private Thickness CalculateMargins(Size controlSize = default) if (this.TerminalRendererSize.Height != 0) { - height = controlSize.Height - (this.TerminalRendererSize.Height / dpiScale.DpiScaleX); + height = controlSize.Height - (this.TerminalRendererSize.Height / dpiScale.DpiScaleY); } width -= this.scrollbar.ActualWidth;