You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
429 B
20 lines
429 B
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; |
|
} |
|
} |
|
}
|
|
|