Minor visual fixups from StyleboxTexture scaling (#17763)
This commit is contained in:
@@ -148,7 +148,7 @@ namespace Content.Client.Paper.UI
|
|||||||
// so we need to get some info out now:
|
// so we need to get some info out now:
|
||||||
if (WrittenTextLabel.TryGetStyleProperty<Font>("font", out var font))
|
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:
|
// This positions the texture so the font baseline is on the bottom:
|
||||||
_paperContentTex.ExpandMarginTop = font.GetDescent(UIScale);
|
_paperContentTex.ExpandMarginTop = font.GetDescent(UIScale);
|
||||||
// And this scales the texture so that it's a single text line:
|
// And this scales the texture so that it's a single text line:
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ namespace Content.Client.UserInterface.Controls
|
|||||||
EdgeColor);
|
EdgeColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
GetActualStyleBox()?.Draw(handle, centerBox);
|
GetActualStyleBox()?.Draw(handle, centerBox, UIScale);
|
||||||
}
|
}
|
||||||
|
|
||||||
private StyleBox? GetActualStyleBox()
|
private StyleBox? GetActualStyleBox()
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
sample:
|
||||||
|
filter: true
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
sample:
|
||||||
|
filter: true
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
sample:
|
||||||
|
filter: true
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
sample:
|
||||||
|
filter: true
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
sample:
|
||||||
|
filter: true
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
sample:
|
||||||
|
filter: true
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
sample:
|
||||||
|
filter: true
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
sample:
|
||||||
|
filter: true
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
sample:
|
||||||
|
filter: true
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
sample:
|
||||||
|
filter: true
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
sample:
|
||||||
|
filter: true
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
sample:
|
||||||
|
filter: true
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
sample:
|
||||||
|
filter: true
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
sample:
|
||||||
|
filter: true
|
||||||
Reference in New Issue
Block a user