diff --git a/src/AtomUI.Desktop.Controls/Drawer/DrawerContainer.cs b/src/AtomUI.Desktop.Controls/Drawer/DrawerContainer.cs index 7a0509c28..a5b3e3dc4 100644 --- a/src/AtomUI.Desktop.Controls/Drawer/DrawerContainer.cs +++ b/src/AtomUI.Desktop.Controls/Drawer/DrawerContainer.cs @@ -1,5 +1,4 @@ using System.Diagnostics; -using AtomUI.Animations; using AtomUI.Controls; using AtomUI.Controls.Primitives; using AtomUI.Desktop.Controls.Themes; @@ -12,7 +11,6 @@ using Avalonia.Controls.Primitives; using Avalonia.Controls.Templates; using Avalonia.Data; using Avalonia.Input; -using Avalonia.Interactivity; using Avalonia.Layout; using Avalonia.Media; using Avalonia.Media.Transformation; @@ -449,45 +447,4 @@ internal class DrawerContainer : ContentControl _infoContainer.RenderTransform = _originInfoContainerTransform; } } - - protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) - { - base.OnPropertyChanged(change); - if (IsLoaded) - { - if (change.Property == IsMotionEnabledProperty) - { - ConfigureTransitions(true); - } - } - } - - private void ConfigureTransitions(bool force) - { - if (IsMotionEnabled) - { - if (force || Transitions == null) - { - Transitions = [ - TransitionUtils.CreateTransition(Border.BackgroundProperty) - ]; - } - } - else - { - Transitions = null; - } - } - - protected override void OnLoaded(RoutedEventArgs e) - { - base.OnLoaded(e); - ConfigureTransitions(false); - } - - protected override void OnUnloaded(RoutedEventArgs e) - { - base.OnUnloaded(e); - Transitions = null; - } } \ No newline at end of file diff --git a/src/AtomUI.Desktop.Controls/Drawer/Themes/DrawerContainerTheme.axaml b/src/AtomUI.Desktop.Controls/Drawer/Themes/DrawerContainerTheme.axaml index e96becfb3..1a80177a1 100644 --- a/src/AtomUI.Desktop.Controls/Drawer/Themes/DrawerContainerTheme.axaml +++ b/src/AtomUI.Desktop.Controls/Drawer/Themes/DrawerContainerTheme.axaml @@ -36,6 +36,14 @@ Value="{atom:SharedTokenResource MotionDurationSlow}" /> - + + + \ No newline at end of file