Singularity/Library/PackageCache/com.unity.timeline@1.6.4/Editor/Utilities/Scopes/LabelWidthScope.cs

21 lines
429 B
C#
Raw Permalink Normal View History

2024-05-06 14:45:45 -04:00
using System;
namespace UnityEditor.Timeline
{
readonly struct LabelWidthScope : IDisposable
{
readonly float m_PrevValue;
public LabelWidthScope(float newValue)
{
m_PrevValue = EditorGUIUtility.labelWidth;
EditorGUIUtility.labelWidth = newValue;
}
public void Dispose()
{
EditorGUIUtility.labelWidth = m_PrevValue;
}
}
}