File tree Expand file tree Collapse file tree 2 files changed +5
-12
lines changed
Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Original file line number Diff line number Diff line change 1515 <TextBlock Margin =" 6,0,0,0" FontSize =" 14" FontWeight =" Bold" Text =" {DynamicResource Text.Running}" />
1616 </StackPanel >
1717
18- <TextBlock x : Name =" TxtDesc"
19- HorizontalAlignment =" Stretch"
18+ <TextBlock HorizontalAlignment =" Stretch"
2019 TextWrapping =" Wrap"
2120 FontSize =" {Binding Source={x:Static vm:Preferences.Instance}, Path=DefaultFontSize, Converter={x:Static c:DoubleConverters.Decrease}}"
2221 FontStyle =" Italic"
Original file line number Diff line number Diff line change @@ -21,17 +21,9 @@ public PopupRunningStatus()
2121 InitializeComponent ( ) ;
2222 }
2323
24- protected override void OnLoaded ( RoutedEventArgs e )
25- {
26- base . OnLoaded ( e ) ;
27-
28- if ( IsVisible )
29- StartAnim ( ) ;
30- }
31-
3224 protected override void OnUnloaded ( RoutedEventArgs e )
3325 {
34- StopAnim ( ) ;
26+ _isUnloading = true ;
3527 base . OnUnloaded ( e ) ;
3628 }
3729
@@ -41,7 +33,7 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang
4133
4234 if ( change . Property == IsVisibleProperty )
4335 {
44- if ( IsVisible )
36+ if ( IsVisible && ! _isUnloading )
4537 StartAnim ( ) ;
4638 else
4739 StopAnim ( ) ;
@@ -61,5 +53,7 @@ private void StopAnim()
6153 Icon . Content = null ;
6254 ProgressBar . IsIndeterminate = false ;
6355 }
56+
57+ private bool _isUnloading = false ;
6458 }
6559}
You can’t perform that action at this time.
0 commit comments