diff --git a/Editor/Drawers/BasePropertyDrawer.cs b/Editor/Drawers/BasePropertyDrawer.cs index e2caad6..0edc0ea 100644 --- a/Editor/Drawers/BasePropertyDrawer.cs +++ b/Editor/Drawers/BasePropertyDrawer.cs @@ -80,9 +80,10 @@ public sealed override VisualElement CreatePropertyGUI(SerializedProperty proper TypeHandlersBinder = HandlerBinderRegistry.GetMap(); PopulateContainer(container); - container.Use(); - + + var subState = StyleDefinition.CombineSubState(typeof(TAttribute).Name, GetType().Name); + container.RootElement.AddToClassList(subState); return container.RootElement; } diff --git a/Editor/Drawers/Container/ElementsContainer.cs b/Editor/Drawers/Container/ElementsContainer.cs index cdcac6f..07be352 100644 --- a/Editor/Drawers/Container/ElementsContainer.cs +++ b/Editor/Drawers/Container/ElementsContainer.cs @@ -113,19 +113,27 @@ private void ScheduleUpdateGeometry(GeometryChangedEvent changedEvent) { if (changedEvent.target is not PropertyField element) return; - element.schedule.Execute(OnGeometryChanged); + element.schedule.Execute(() => OnGeometryChanged(element)); } - private void OnGeometryChanged() + private void OnGeometryChanged(VisualElement element) { - var label = RootElement.Query