Fix text not getting clipped in Label with negative margins

This commit is contained in:
GoaLitiuM
2021-03-07 15:45:34 +02:00
parent b8d03636dc
commit 4795ffdf3d

View File

@@ -192,7 +192,7 @@ namespace FlaxEngine.GUI
var rect = new Rectangle(new Vector2(Margin.Left, Margin.Top), Size - Margin.Size);
if (ClipText)
Render2D.PushClip(ref rect);
Render2D.PushClip(new Rectangle(Vector2.Zero, Size));
var color = IsMouseOver ? TextColorHighlighted : TextColor;