mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
fix: memory leak caused by animation
This commit is contained in:
parent
8ae864a14d
commit
b6e087259b
7 changed files with 50 additions and 28 deletions
27
src/Views/LoadingIcon.axaml.cs
Normal file
27
src/Views/LoadingIcon.axaml.cs
Normal file
|
@ -0,0 +1,27 @@
|
|||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
|
||||
namespace SourceGit.Views
|
||||
{
|
||||
public partial class LoadingIcon : UserControl
|
||||
{
|
||||
public LoadingIcon()
|
||||
{
|
||||
IsHitTestVisible = false;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override void OnLoaded(RoutedEventArgs e)
|
||||
{
|
||||
base.OnLoaded(e);
|
||||
target.Classes.Add("rotating");
|
||||
}
|
||||
|
||||
protected override void OnUnloaded(RoutedEventArgs e)
|
||||
{
|
||||
base.OnUnloaded(e);
|
||||
target.Classes.Clear();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue