qBittorrent
qBittorrent copied to clipboard
Fix highlighted piece color
Much better contrast with download piece and selected pieces. Previously same color was used for both
New Behaviour
https://github.com/qbittorrent/qBittorrent/assets/34717789/b3d80dbb-47aa-4e03-b1e6-22f31b2e7982
https://github.com/qbittorrent/qBittorrent/assets/34717789/58f08ea1-eb86-4487-9f5d-d21363547d7f
I don't have the best monitor so don't rely on my opinion. Tested only in KDE with light and dark breeze themes, IMO it looks better in dark and not better or worse in light: Up is master and down is this PR:
Haven't tested yet but how does this behave in light/dark "app" mode on Windows when "accent" color is changed?
Haven't tested yet but how does this behave in light/dark "app" mode on Windows when "accent" color is changed?
Piece colour is always based on the highlight color of QPalatte, which is always constant on Windows and not related to accent. I prefer we keep the scope limited to largest use case i.e default settings, you can't test or make this work on all colors. The attached screenshot in PR description is with default light/dark mode on Windows.
Piece colour is always based on the highlight color of QPalatte, which is always constant on Windows and not related to accent.
Not completely accurate anymore as of Qt 6.5+ "dark mode"
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).
https://www.qt.io/blog/dark-mode-on-windows-11-with-qt-6.5
That's why I asked, in any case - this PR does appear to enhance the contrast.
Not completely accurate anymore as of Qt 6.5+ "dark mode"
~~QPalette::Acent is different from QPalette:Highlight, which is (always been) used here, The screenshot attached in PR description is with QT 6.5 dark/light mode~~ (oopsie I reread your comment but slowly 😅)
@jagannatharjun FYI it has merge conflicts. It could have once more with #21183.
Looks good for me 👍
rebased
re-tested! 👍
@jagannatharjun Thank you!