Skip to content
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

Fix always-enabled dark mode shadow bug #4685

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RGarrido03
Copy link

PR checklist

Quick summary of changes
This PR adds a fix for the shadow bug, where the dark theme one was applied all the time, even when using the light theme (check the issue section for more details).

It uses the dwmapi DLL and its DwmSetWindowAttribute method.

However, the shadow change isn't seamless (i.e., the transition is instant, as opposed to the smooth fade regarding the color scheme).

Which issue does this PR relate to?
Big shout-out to @BreeceW and their issue (microsoft/microsoft-ui-xaml#8377), because they found a workaround for this bug, which results in this PR. It's sad that this isn't fixed in WinUI itself, though.

The microsoft/microsoft-ui-xaml#7131 issue also references this problem, although the posted workaround doesn't solve this issue.

Applies to the following platforms:

  • WinUI
  • WPF
  • UWP

Anything that requires particular review or attention?
No

Do all automated tests pass?
Yes

Have automated tests been added for new features?
N/A

If you've changed the UI:

  • Be sure you are including screenshots to show the changes.
  • Be sure you have reviewed the accessibility checklist.

If you've included a new template:

Have you raised issues for any needed follow-on work?
N/A

Have docs been updated?
No

If breaking changes or different ways of doing things have been introduced, have they been communicated widely?
N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant