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:

View File

@@ -113,7 +113,7 @@ namespace Content.Client.UserInterface.Controls
EdgeColor);
}
GetActualStyleBox()?.Draw(handle, centerBox);
GetActualStyleBox()?.Draw(handle, centerBox, UIScale);
}
private StyleBox? GetActualStyleBox()

View File

@@ -0,0 +1,2 @@
sample:
filter: true

View File

@@ -0,0 +1,2 @@
sample:
filter: true

View File

@@ -0,0 +1,2 @@
sample:
filter: true

View File

@@ -0,0 +1,2 @@
sample:
filter: true

View File

@@ -0,0 +1,2 @@
sample:
filter: true

View File

@@ -0,0 +1,2 @@
sample:
filter: true

View File

@@ -0,0 +1,2 @@
sample:
filter: true

View File

@@ -0,0 +1,2 @@
sample:
filter: true

View File

@@ -0,0 +1,2 @@
sample:
filter: true

View File

@@ -0,0 +1,2 @@
sample:
filter: true

View File

@@ -0,0 +1,2 @@
sample:
filter: true

View File

@@ -0,0 +1,2 @@
sample:
filter: true

View File

@@ -0,0 +1,2 @@
sample:
filter: true

View File

@@ -0,0 +1,2 @@
sample:
filter: true