Make sure to account for the size the padding _will be_ scaled to (#5091)

* [x] Fixes #2061 for good this time
This commit is contained in:
Mike Griese 2020-03-23 17:24:33 -05:00 committed by GitHub
parent f088ae62b3
commit e05507982d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) };
}