From 4795ffdf3d1c61692a82a4e134fb05b4d802dd75 Mon Sep 17 00:00:00 2001 From: GoaLitiuM Date: Sun, 7 Mar 2021 15:45:34 +0200 Subject: [PATCH] Fix text not getting clipped in Label with negative margins --- Source/Engine/UI/GUI/Common/Label.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Engine/UI/GUI/Common/Label.cs b/Source/Engine/UI/GUI/Common/Label.cs index d797c25f4..0889bad9d 100644 --- a/Source/Engine/UI/GUI/Common/Label.cs +++ b/Source/Engine/UI/GUI/Common/Label.cs @@ -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;