mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Make pause and resume when progressbarvisibility changed.
This commit is contained in:
parent
5688f377e0
commit
0730956822
1 changed files with 17 additions and 4 deletions
|
|
@ -52,7 +52,7 @@ namespace Flow.Launcher
|
|||
|
||||
private void OnInitialized(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void OnLoaded(object sender, RoutedEventArgs _)
|
||||
|
|
@ -85,14 +85,27 @@ namespace Flow.Launcher
|
|||
_viewModel.LastQuerySelected = true;
|
||||
}
|
||||
|
||||
ProgressBar.BeginStoryboard(_progressBarStoryboard);
|
||||
}
|
||||
else
|
||||
{
|
||||
_progressBarStoryboard.Stop();
|
||||
}
|
||||
}
|
||||
|
||||
else if (e.PropertyName == nameof(MainViewModel.ProgressBarVisibility))
|
||||
{
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
if (ProgressBar.Visibility == Visibility.Hidden)
|
||||
{
|
||||
_progressBarStoryboard.Pause();
|
||||
}
|
||||
else
|
||||
{
|
||||
_progressBarStoryboard.Resume();
|
||||
}
|
||||
}, System.Windows.Threading.DispatcherPriority.Render);
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
_settings.PropertyChanged += (o, e) =>
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue