Minor visual fixups from StyleboxTexture scaling (#17763)

This commit is contained in:
eoineoineoin
2023-07-08 19:57:47 +01:00
committed by GitHub
parent 8762d4a0e7
commit 08d6a42983
16 changed files with 30 additions and 2 deletions

View File

@@ -148,7 +148,7 @@ namespace Content.Client.Paper.UI
// so we need to get some info out now:
if (WrittenTextLabel.TryGetStyleProperty<Font>("font", out var font))
{
float fontLineHeight = font.GetLineHeight(UIScale);
float fontLineHeight = font.GetLineHeight(1.0f);
// This positions the texture so the font baseline is on the bottom:
_paperContentTex.ExpandMarginTop = font.GetDescent(UIScale);
// And this scales the texture so that it's a single text line: