fix: Merge Armature inspector breaks animator editor styles (#531)

Also fix another style leak in ESO
This commit is contained in:
bd_ 2023-11-14 22:10:29 +09:00 committed by GitHub
parent 1410503609
commit 07eedb370d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -22,8 +22,8 @@ namespace nadena.dev.modular_avatar.core.editor
internal static void InitStyles() internal static void InitStyles()
{ {
buttonStyle = EditorStyles.miniButtonRight; buttonStyle = new GUIStyle(EditorStyles.miniButtonRight);
labelStyle = EditorStyles.label; labelStyle = new GUIStyle(EditorStyles.label);
labelStyle.wordWrap = true; labelStyle.wordWrap = true;
buttonStyle.fixedWidth = 40f; buttonStyle.fixedWidth = 40f;

View File

@ -53,14 +53,14 @@ namespace nadena.dev.modular_avatar.core.editor
{ {
var val = !propLockMode.hasMultipleDifferentValues && propLockMode.enumValueIndex == (int) index; var val = !propLockMode.hasMultipleDifferentValues && propLockMode.enumValueIndex == (int) index;
var selectionStyle = val ? (GUIStyle) "flow node 1" : (GUIStyle) "flow node 0"; var selectionStyle = new GUIStyle(val ? (GUIStyle) "flow node 1" : (GUIStyle) "flow node 0");
selectionStyle.padding = new RectOffset(0, 0, 0, 0); selectionStyle.padding = new RectOffset(0, 0, 0, 0);
selectionStyle.margin = new RectOffset(0, 0, 5, 5); selectionStyle.margin = new RectOffset(0, 0, 5, 5);
var boldLabel = EditorStyles.boldLabel; var boldLabel = new GUIStyle(EditorStyles.boldLabel);
boldLabel.wordWrap = true; boldLabel.wordWrap = true;
var normalLabel = EditorStyles.label; var normalLabel = new GUIStyle(EditorStyles.label);
normalLabel.wordWrap = true; normalLabel.wordWrap = true;
EditorGUILayout.BeginVertical(selectionStyle); EditorGUILayout.BeginVertical(selectionStyle);