Skip to content

style: update player page to show window deactivation status#813

Merged
huynhsontung merged 3 commits intomainfrom
United600/player-page
Apr 12, 2026
Merged

style: update player page to show window deactivation status#813
huynhsontung merged 3 commits intomainfrom
United600/player-page

Conversation

@United600
Copy link
Copy Markdown
Collaborator

@United600 United600 commented Mar 17, 2026

Added Deactivated visual state to PlayerPage.xaml so when the window is deactivated, the title bar text colors are updated, especially important for the compact overlay mode.
I wonder if we should consider lowering the opacity of the top buttons and controls?

Gravacao.2026-03-17.185512.mp4

@huynhsontung
Copy link
Copy Markdown
Owner

Yes, we should dim the top controls and buttons, similar to how the NavView dims the back button when the window is deactivated.

@United600
Copy link
Copy Markdown
Collaborator Author

Yes, we should dim the top controls and buttons, similar to how the NavView dims the back button when the window is deactivated.

I'm concerned about the hover visuals, because unlike the NavView back button they'll still react.
We could disable the title bar buttons, but that introduces its own issues such as requiring the window to be focused before they respond to any input.

Here is the related documentation and pertinent point.

Title bar do's and dont's

PS: I don't know of a single app that dims the icon.

improve player page deactivated state
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Apr 2, 2026

var coreWindow = _coreWindow;
if (coreWindow != null)
_weakEventListener = new(this)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Inspired by the Community Toolkit NetworkConnectionStateTrigger trigger, and using this helper.

Is this the best way to "unsubscribe" from the event? Not overly familiar with weak events.

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.

Yes. This is a perfect use of WeakEventListener, actually. This is great.

@huynhsontung
Copy link
Copy Markdown
Owner

Technically, MainPage and PlayerPage will persist throughout the app session, so the Trigger's lifetime isn't that important, since it must live until the app terminates. But this is a good standard.

@huynhsontung huynhsontung enabled auto-merge (squash) April 12, 2026 22:42
@huynhsontung huynhsontung merged commit d5c3eee into main Apr 12, 2026
4 checks passed
@United600 United600 deleted the United600/player-page branch April 12, 2026 23:01
@United600
Copy link
Copy Markdown
Collaborator Author

Technically, MainPage and PlayerPage will persist throughout the app session, so the Trigger's lifetime isn't that important, since it must live until the app terminates. But this is a good standard.

True, thought I really want to try to unload the PlayerPage when not in use. Ideally both pages wouldn't be coupled together, but that ship has sailed with the way we handle the Overlay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants