Skip to content

[Feature] Autohide Taskbar Widget when Media is paused#499

Merged
unchihugo merged 5 commits intounchihugo:masterfrom
zen1337th:feat/widget/autohide
Mar 27, 2026
Merged

[Feature] Autohide Taskbar Widget when Media is paused#499
unchihugo merged 5 commits intounchihugo:masterfrom
zen1337th:feat/widget/autohide

Conversation

@zen1337th
Copy link
Copy Markdown
Contributor

This PR aims to add an option to automatically hide the Taskbar Widget when Media is paused.

"Why?" you might ask;

I and surely a lot of people using FluentFlyout love to customize their programs and tools they like using to match their workflow and needs. Yet I felt like this addition was somewhat missing to the Taskbar Widget, since I personally disliked seeing the last listened song with the paused symbol on the cover in my taskbar.

Note:

I am currently learning software development and dedicating most of my free time to learn and improve from any mistakes. I am open for any advice towards improving my skills, quality and understanding.

@github-actions github-actions Bot added TaskbarWindow Changes to TaskbarWindow; the container for taskbar widgets Taskbar Widget Changes to the Taskbar Media Widget labels Mar 18, 2026
@unchihugo
Copy link
Copy Markdown
Owner

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!

@mak7im01
Copy link
Copy Markdown
Contributor

@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

@unchihugo
Copy link
Copy Markdown
Owner

unchihugo commented Mar 21, 2026

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

@github-actions github-actions Bot added the MainWindow / Media Flyout Changes to MainWindow including the Media Flyout label Mar 21, 2026
@unchihugo
Copy link
Copy Markdown
Owner

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 :)

@mak7im01
Copy link
Copy Markdown
Contributor

Hi @unchihugo , I'll add a hide timer function when @zen1337th adds the basic functionality with auto-hide

@zen1337th
Copy link
Copy Markdown
Contributor Author

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 :)

Sorry, I missclicked on that one. Sure, I will do that ^^

@zen1337th zen1337th force-pushed the feat/widget/autohide branch from d2f093b to b8f26fb Compare March 21, 2026 21:04
@zen1337th
Copy link
Copy Markdown
Contributor Author

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!

@mak7im01
Copy link
Copy Markdown
Contributor

Hi @zen1337th, I meant that after you add auto-hide, I'll add a timer function for it.
If you can implement it yourself, I'm fine with that. The only thing I'd like to ask/clarify is: will it look like in my video #499 (comment)?
Just to clarify, my timer is 360 seconds in 5-second increments. Setting it to zero disables the timer function.

Thanks in advance to you too.

@unchihugo
Copy link
Copy Markdown
Owner

@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.

@zen1337th
Copy link
Copy Markdown
Contributor Author

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.
image

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!

@mak7im01
Copy link
Copy Markdown
Contributor

@zen1337th , please specify in the description of this function (hiding) that it hides after 720 ms.
I'll wait for the update with your function to be released, and then I'll decide whether to add this timer or not.

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

@unchihugo
Copy link
Copy Markdown
Owner

@zen1337th , please specify in the description of this function (hiding) that it hides after 720 ms. I'll wait for the update with your function to be released, and then I'll decide whether to add this timer or not.

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 :)

@zen1337th
Copy link
Copy Markdown
Contributor Author

zen1337th commented Mar 23, 2026

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.mp4

EDIT: If mentioning the 750ms would make sense, then I would push the change.

@mak7im01
Copy link
Copy Markdown
Contributor

mak7im01 commented Mar 23, 2026

@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.

@unchihugo
Copy link
Copy Markdown
Owner

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?

@zen1337th
Copy link
Copy Markdown
Contributor Author

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.

@unchihugo
Copy link
Copy Markdown
Owner

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!

Copy link
Copy Markdown
Owner

@unchihugo unchihugo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far! Just a few changes I've requested as comments before we merge the current functionality :)

return;
}

if (!Dispatcher.CheckAccess())
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't need this if block, just safely wrap the UI changes into Dispatcher.Invoke() functions (explained in my next comment)!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
            });

@zen1337th zen1337th requested a review from unchihugo March 25, 2026 21:26
Copy link
Copy Markdown
Owner

@unchihugo unchihugo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect now, thank you for working on this!

@unchihugo unchihugo merged commit c6f4177 into unchihugo:master Mar 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

MainWindow / Media Flyout Changes to MainWindow including the Media Flyout Taskbar Widget Changes to the Taskbar Media Widget TaskbarWindow Changes to TaskbarWindow; the container for taskbar widgets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants