fix group element text clipping
fixes group element header text clipping outside of the header and into the settings icon (if there is one). Also some extra code to handle script editor, as that displays some extra icons in the header.
This commit is contained in:
@@ -361,7 +361,7 @@ namespace FlaxEngine.GUI
|
||||
var style = Style.Current;
|
||||
var enabled = EnabledInHierarchy;
|
||||
|
||||
// Paint Background
|
||||
// Draw Background
|
||||
var backgroundColor = BackgroundColor;
|
||||
if (backgroundColor.A > 0.0f)
|
||||
{
|
||||
@@ -388,7 +388,7 @@ namespace FlaxEngine.GUI
|
||||
ArrowImageOpened?.Draw(dropDownRect, arrowColor);
|
||||
}
|
||||
|
||||
// Text
|
||||
// Header text
|
||||
var textRect = new Rectangle(textLeft, 0, Width - textLeft, HeaderHeight);
|
||||
_headerTextMargin.ShrinkRectangle(ref textRect);
|
||||
var textColor = HeaderTextColor;
|
||||
@@ -397,7 +397,9 @@ namespace FlaxEngine.GUI
|
||||
textColor *= 0.6f;
|
||||
}
|
||||
|
||||
Render2D.PushClip(textRect);
|
||||
Render2D.DrawText(HeaderTextFont.GetFont(), HeaderTextMaterial, HeaderText, textRect, textColor, TextAlignment.Near, TextAlignment.Center);
|
||||
Render2D.PopClip();
|
||||
|
||||
if (!_isClosed && EnableContainmentLines)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user