Skip to content

Commit 5a934bd

Browse files
committed
Fix label size
1 parent 86161ee commit 5a934bd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Assets/com.alelievr.NodeGraphProcessor/Editor/Utils/ExposedParameterDrawer.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public override VisualElement CreatePropertyGUI(SerializedProperty property)
9494
var max = settings.FindPropertyRelative(nameof(IntParameter.IntSettings.max));
9595
container.Add(new IMGUIContainer(() => {
9696
int newValue;
97+
EditorGUIUtility.labelWidth = 150;
9798
if ((IntParameter.IntMode)mode.enumValueIndex == IntParameter.IntMode.Slider)
9899
{
99100
newValue = EditorGUILayout.IntSlider(name.stringValue, val.intValue, min.intValue, max.intValue);
@@ -106,6 +107,7 @@ public override VisualElement CreatePropertyGUI(SerializedProperty property)
106107
val.intValue = newValue;
107108
ApplyModifiedProperties(property);
108109
}
110+
EditorGUIUtility.labelWidth = 0;
109111
}));
110112

111113
return container;
@@ -126,6 +128,7 @@ public override VisualElement CreatePropertyGUI(SerializedProperty property)
126128
var min = settings.FindPropertyRelative(nameof(Vector2Parameter.Vector2Settings.min));
127129
var max = settings.FindPropertyRelative(nameof(Vector2Parameter.Vector2Settings.max));
128130
container.Add(new IMGUIContainer(() => {
131+
EditorGUIUtility.labelWidth = 150;
129132
EditorGUI.BeginChangeCheck();
130133
if ((Vector2Parameter.Vector2Mode)mode.enumValueIndex == Vector2Parameter.Vector2Mode.MinMaxSlider)
131134
{
@@ -138,6 +141,7 @@ public override VisualElement CreatePropertyGUI(SerializedProperty property)
138141
val.vector2Value = EditorGUILayout.Vector2Field(name.stringValue, val.vector2Value);
139142
if (EditorGUI.EndChangeCheck())
140143
ApplyModifiedProperties(property);
144+
EditorGUIUtility.labelWidth = 0;
141145
}));
142146

143147
return container;

0 commit comments

Comments
 (0)