Skip to content

Commit

Permalink
Make sure to account for the size the padding _will be_ scaled to (#5091
Browse files Browse the repository at this point in the history
)

* [x] Fixes #2061 for good this time
  • Loading branch information
zadjii-msft authored Mar 23, 2020
1 parent f088ae6 commit e055079
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cascadia/TerminalControl/TermControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1975,8 +1975,9 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation

double height = rows * fFontHeight;
auto thickness = _ParseThicknessFromPadding(settings.Padding());
width += thickness.Left + thickness.Right;
height += thickness.Top + thickness.Bottom;
// GH#2061 - make sure to account for the size the padding _will be_ scaled to
width += scale * (thickness.Left + thickness.Right);
height += scale * (thickness.Top + thickness.Bottom);

return { gsl::narrow_cast<float>(width), gsl::narrow_cast<float>(height) };
}
Expand Down

0 comments on commit e055079

Please sign in to comment.