-
-
Notifications
You must be signed in to change notification settings - Fork 455
Stop ProgressBar animation when Flow is hidden #295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-Authored-By: imsh <[email protected]>
|
what happens when the query is still loading though? like if its a long running query, i click on some other window and come back a minute later, this change means the bar will stop if it's hidden despite the query is still running right? |
|
hmmm you are right. Let me use the dispatcher to disable and restart animation only when Progressbar visibility change instead of Mainwindow visibility. |
|
i dont think this is working as intended. Visibility doesnt seem to be wired up properly, because regardless whether the mainwindow is hidden or visible, the visibility is always visible. Same for progress bar visibility as well, it's always visible == true |
Flow.Launcher/MainWindow.xaml.cs
Outdated
| { | ||
| Dispatcher.Invoke(() => | ||
| { | ||
| if (ProgressBar.Visibility == Visibility.Hidden) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldnt this be MainViewModel.MainWindowVisibility? i thought we are resuming and pausing progress bar animation based on the visibility of mainwindow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens when the query is still loading though? like if its a long running query, i click on some other window and come back a minute later, this change means the bar will stop if it's hidden despite the query is still running right?
That's the reason changing this to progressbar visibility
1. Disable animation when progressbar is hidden or mainwindow is collapsed 2. resume only when both visibility and progressbar visibility is visible
|
Done, please review. |
| } | ||
| else | ||
| { | ||
| _progressBarStoryboard.Pause(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to be called everytime the mainwindow is hidden, how come a check is not added here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in db63833
|
Not sure whether this can fix #128. Let's do more testing before close that via this pr. |
|
Although not from this change, this code does not set the progress bar when the main window is hidden. To repro, when main window is visible click anywhere else on the screen, the main window will be hidden, but the Visibility property is still visible rather than hidden. Wonder if this is an easy fix we can do? Flow.Launcher/Flow.Launcher/MainWindow.xaml.cs Lines 74 to 77 in d0af7a1
|
We can use MainViewModel.MainWindowVisibility instead. |
oh ok gotcha |
|
👍 👍 |
#128
Wox-launcher/Wox#3246
Co-Authored-By: imsh [email protected]