Skip to content

Commit

Permalink
wpf: base margin height off Y dpi, not X dpi (#8039)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ScriptKat authored Oct 26, 2020
1 parent 84bda06 commit c095a67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cascadia/WpfTerminalControl/TerminalControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c095a67

Please sign in to comment.