[Feature] Autohide Taskbar Widget when Media is paused#499
[Feature] Autohide Taskbar Widget when Media is paused#499unchihugo merged 5 commits intounchihugo:masterfrom
Conversation
|
Hi @zen1337th, thanks for your interest in contributing to FluentFlyout! Unfortunately, I don't see a lot of users needing this feature currently. More features doesn't necessarily mean better — see Hick's law in UX. Because of that, I can't merge this right now. I'll leave it open for discussion to see if other people would like something like this or if we can move the setting to the advanced settings page! |
|
@unchihugo Coincidentally, I was working on the same functionality as in this request, but with a slightly different implementation. The code is completely ready. Video.mp4 |
|
Hi guys, looks like there's some demand for this feature (#554). We can go through with this - could you guys (@zen1337th and @mak7im01) discuss how to continue if you'd like to finish the implementation? Thanks! EDIT: tagged the wrong issue |
|
Hi @zen1337th, it looks like you might've done a rebase instead of a master merge into your branch. Could you redo this? It'll be easier for me to review the code that way :) |
|
Hi @unchihugo , I'll add a hide timer function when @zen1337th adds the basic functionality with auto-hide |
Sorry, I missclicked on that one. Sure, I will do that ^^ |
d2f093b to
b8f26fb
Compare
|
Hi @mak7im01, can you please further define what you mean with "adds the basic functionality with auto-hide"? If you could let me know I would be glad to make the changes you need for implementing a hide timer function for auto-hide. Thanks in advance! |
|
Hi @zen1337th, I meant that after you add auto-hide, I'll add a timer function for it. Thanks in advance to you too. |
|
@mak7im01 if it's easier for you, you can also open PRs on @zen1337th fork to merge into their branch. This might make it easier for us to keep things managed in this PR. |
|
Hi @mak7im01 thanks for the clarification. To answer your question: Currently, not. I have also thought about making a slider like you have in your example as well - yet a simple toggle button made more sense to me personally, as you can see in the screenshot below. The fixed value is currently 750ms until it hides automatically. I have a few ideas in mind on how we can implement both of a toggle and a slider to choose the duration for the auto-hide option if you'd like to discuss those in a different PR. I wish you guys a nice evening! |
|
@zen1337th , please specify in the description of this function (hiding) that it hides after 720 ms. This is all after you specified that it hides after 720 ms. I thought it would hide immediately, but it turns out it's after more than a minute. Thank you too |
Just chiming in: 750ms is 0.75 seconds, not more than a minute so I think the description is okay :) |
I think mentioning in the description that it hides after 750ms would be fine? But for you @mak7im01, here is a short video demonstrating how long it takes after the pause to hide: dX4paJ7sZm.mp4EDIT: If mentioning the 750ms would make sense, then I would push the change. |
|
@zen1337th , I think it's better to add it, but @unchihugo has the final say on whether to add the time stamp (0.75 seconds) or not. |
|
We can leave it out, the visualizer does something similar without mentioning (500ms to hide when no audio is playing). Looking at the video the hide is quite abrupt, do you think that we can have some kind of fade out animation instead? |
I can see what I can do. |
It's alright actually, I'll review your code and merge if it's good! |
unchihugo
left a comment
There was a problem hiding this comment.
Looks good so far! Just a few changes I've requested as comments before we merge the current functionality :)
| return; | ||
| } | ||
|
|
||
| if (!Dispatcher.CheckAccess()) |
There was a problem hiding this comment.
I think we don't need this if block, just safely wrap the UI changes into Dispatcher.Invoke() functions (explained in my next comment)!
There was a problem hiding this comment.
Not sure if I understood this correctly, though removing this if block throws an InvalidOperationException with the message "The calling thread cannot access this object because a different thread owns it." as you can see in the recording below.
Keeping the if block resolved this issue in my case, which is why I added it in the first place.
rider64_MFOf39EWfJ.mp4
There was a problem hiding this comment.
Not sure if I understood this correctly, though removing this if block throws an InvalidOperationException with the message "The calling thread cannot access this object because a different thread owns it." as you can see in the recording below.
Keeping the if block resolved this issue in my case, which is why I added it in the first place.
rider64_MFOf39EWfJ.mp4
yes, this is why we wrap the UI manipulation code to the UI thread in the second comment I've added :)
| _autoHideTimer?.Stop(); | ||
| _autoHideTimer = null; | ||
|
|
||
| Visibility = Visibility.Visible; |
There was a problem hiding this comment.
This should be wrapped in a Dispatcher.Invoke method so it's on the UI thread, same with line 636
Dispatcher.Invoke(() =>
{
Visibility = Visibility.Visible;
});
unchihugo
left a comment
There was a problem hiding this comment.
Perfect now, thank you for working on this!

This PR aims to add an option to automatically hide the Taskbar Widget when Media is paused.
"Why?" you might ask;
Note: