Skip to content

Commit 1dca429

Browse files
svc-reach-platform-supportEvergreen
authored andcommitted
[Port] [6000.0] [UUM-104008][URP 2D] Fix LIght2D toggle UI
1 parent 09a3bcf commit 1dca429

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Packages/com.unity.render-pipelines.universal/Editor/2D/Light2DEditor.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,10 @@ private void DrawHeaderFoldoutWithToggle(GUIContent title, SavedBool foldoutStat
196196
labelRect.xMin += 16f;
197197
labelRect.xMax -= 20f;
198198

199-
bool newToggleState = GUI.Toggle(labelRect, toggleState.boolValue, " "); // Needs a space because the checkbox won't have a proper outline if we don't make a space here
199+
var labelRect_toggle = labelRect;
200+
labelRect_toggle.width = labelRect.height;
201+
202+
bool newToggleState = GUI.Toggle(labelRect_toggle, toggleState.boolValue, " "); // Needs a space because the checkbox won't have a proper outline if we don't make a space here
200203
bool newFoldoutState = CoreEditorUtils.DrawHeaderFoldout("", foldoutState.value);
201204

202205
if (newToggleState != toggleState.boolValue)

0 commit comments

Comments
 (0)