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 for Accent Color Change Theme bug #1524

Merged
merged 5 commits into from Nov 4, 2023

Conversation

raghavdhingra24
Copy link
Contributor

@raghavdhingra24 raghavdhingra24 commented Oct 26, 2023


Hi there,
Accent color change in QT>=6.5 makes windows title bar go back to light mode and no method is currently available to prevent this - See: https://www.qt.io/blog/dark-mode-on-windows-11-with-qt-6.5. This code is currently hacky and sometimes fails to work or cause a flicker.

Video:

Before After
https://github.com/marticliment/WingetUI/assets/106472154/2ff63f61-b449-497a-ac45-7a9d59bce2c9 https://github.com/marticliment/WingetUI/assets/106472154/eec61ccc-ad3a-465e-b510-78c3e4634a5f
Updated Video: https://github.com/marticliment/WingetUI/assets/106472154/13621319-1909-406b-893a-3940562d6ec0

Some other ways to reduce currently occurring problems -

  1. We can increase the timeout to 2000ms or 3000ms for waiting for qt to finish changing the theme - decreases failure but causes the app show light mode for longer time.
  2. Set app style to None - can have some unwanted behavior.

Thanks

Edit: Formatting
Edit2: Added updated video

@raghavdhingra24
Copy link
Contributor Author

I have updated timer to wait for 3000ms. This makes the theme change back to selected one work most of the times.

Updated Video -
https://github.com/marticliment/WingetUI/assets/106472154/13621319-1909-406b-893a-3940562d6ec0

@marticliment
Copy link
Owner

marticliment commented Oct 30, 2023

Seems fine until this bug gets fixed by Qt.
When ready let me know to be able to merge.

Thanks!

@raghavdhingra24 raghavdhingra24 marked this pull request as ready for review November 3, 2023 17:29
@raghavdhingra24
Copy link
Contributor Author

Checked on Windows 10 and the code is working correctly, ready to merge.

@marticliment marticliment merged commit 3fad1cf into marticliment:main Nov 4, 2023
@marticliment
Copy link
Owner

I have done my testing and it appears to work fine.

Thank you!

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.

None yet

2 participants