qBittorrent icon indicating copy to clipboard operation
qBittorrent copied to clipboard

Fix highlighted piece color

Open jagannatharjun opened this issue 1 year ago • 9 comments

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

jagannatharjun avatar Jun 18 '24 17:06 jagannatharjun

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:

light1 light

dark1 dark

thalieht avatar Jun 18 '24 19:06 thalieht

Haven't tested yet but how does this behave in light/dark "app" mode on Windows when "accent" color is changed?

xavier2k6 avatar Jun 19 '24 09:06 xavier2k6

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.

jagannatharjun avatar Jun 19 '24 20:06 jagannatharjun

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.

xavier2k6 avatar Jun 19 '24 21:06 xavier2k6

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 avatar Jun 20 '24 06:06 jagannatharjun

@jagannatharjun FYI it has merge conflicts. It could have once more with #21183.

Chocobo1 avatar Aug 11 '24 08:08 Chocobo1

Looks good for me 👍

glassez avatar Aug 11 '24 11:08 glassez

rebased

jagannatharjun avatar Aug 27 '24 11:08 jagannatharjun

re-tested! 👍

xavier2k6 avatar Aug 27 '24 11:08 xavier2k6

@jagannatharjun Thank you!

glassez avatar Sep 02 '24 05:09 glassez