qBittorrent
qBittorrent copied to clipboard
Dark Mode: Windows - Qt 6's use of "accent" color for the `QPalette::Highlight` color role creates a negative "user experience"
qBittorrent & operating system versions
qBittorrent: 5.0.0 x64 Operating system: Windows 10 Pro x64 (22H2) 10.0.19045 Qt: 6.7.3 libtorrent-rasterbar: 2.0.11
What is the problem?
Qt 6 uses accent color on Windows when reading the dark system palette, this causes a negative/undesired/unexpected "user experience".
See other examples:
- #21503
- #21427
Steps to reproduce
- Enable Dark Mode.
- Change
accentcolor in Windows - Observe
alternating rowcolors/progress bar.....highlight text in Execution Logs & someiconsare barely visible etc due to change to match theaccentcolor
Additional context
When we read the dark system palette on Windows, then we use the theme's accent color for the QPalette::Highlight color role. This is however not quite correct, as the Accent is used in other places as well, and some controls use different colors (i.e. on Windows 11's "red" dark theme, the highlight is bright red, while the focus frames are in a paler orange). QPalette doesn't have an Accent color role right now, and adding that is a bit complex as the internal QPalette data structures need to change quite a bit once we go above 21 color roles - and we are at 21 already.
https://www.qt.io/blog/dark-mode-on-windows-11-with-qt-6.5#:~:text=When%20we%20read%20the%20dark%20system%20palette%20on%20Windows,%20then%20we%20use%20the%20theme's%20accent%20color%20for%20the%20QPalette::Highlight%20color%20role.
Log(s) & preferences file(s)
N/A