qBittorrent
qBittorrent copied to clipboard
Enhance readability in execution log across light/dark themes
Use QColorConstants::Svg
colors to enhance readability across light/dark themes.
- https://doc.qt.io/qt-5/qcolorconstants.html#svg-colors
- https://doc.qt.io/qt-6/qcolorconstants.html#svg-colors
Screenshots:
![logs_light_mode](https://user-images.githubusercontent.com/42386382/189871178-970b9c47-521d-470e-a315-330346a1c8eb.png)
![logs_dark_mode](https://user-images.githubusercontent.com/42386382/189871182-59996b3c-e8a6-4639-b91b-cd457dc5c153.png)
Closes #15401
LGTM but is it a good idea to change NORMAL color? I imagine black on white and white on... dark are easier to read. 👍 for dark orange change. Light theme needed it and it's still perfectly readable in dark (i'm still a proponent of different colors for light/dark). Also i'd change commit msg since no actual code for system theme was touched: "Enhance readability in execution log across light/dark themes" or something like that and remove everything in the body.
is it a good idea to change NORMAL color? I imagine black on white and white on... dark are easier to read.
See https://github.com/qbittorrent/qBittorrent/issues/15401#issuecomment-908572292
You can test it by running qbittorrent (any version) via command prompt in windows with qbittorrent -platform windows:darkmode=2
& then switching from light/dark mode in settings->personalisation->colours etc.
- Also, it seems that the filters list suffers from this same type of issue & possibly some buttons. (unsure if code
QApplication::palette().color(QPalette::WindowText
is same, I haven't looked in to it)
(I chose to change it to qcolorconstant for the convenience of a simple fix) maybe others have a better suggestion?!
Also i'd change commit msg since no actual code for system theme was touched: "Enhance readability in execution log across light/dark themes" or something like that and remove everything in the body.
Will do, thanks.
For me the text has too low contrast when using light theme and it makes the text hard to read. IMO there should be separate color sets for light, dark themes.
For me the text has too low contrast when using light theme and it makes the text hard to read. IMO there should be separate color sets for light, dark themes.
I have been telling it from the beginning. No major application uses, same color for light and dark theme. It just doesn't work.
IMO there should be separate color sets for light, dark themes.
I have been telling it from the beginning. No major application uses, same color for light and dark theme. It just doesn't work.
We've used these colors in transfer list & for the icons! (seems nobody has had any really issue with these previously?!)
I will change the blue/green.
However, I've discovered that this results in another issue in dark mode due to the color change of the highlighting bar. (grey to dark blue, kind of like the color used in progress bar)
![green highlighted dark](https://user-images.githubusercontent.com/42386382/190142209-13f750b5-0b0a-4544-992c-e029828bb2bf.png)
![green highlighted bright](https://user-images.githubusercontent.com/42386382/190142214-f0ed4e14-780f-4916-8ec0-1a2b77ff78d9.png)
Anyone know how to change the "highlight" bar color or where in the code I should look?
Anyone know how to change the "highlight" bar color or where in the code I should look?
No idea if it's the best way or place to do it. Does INFO color (the messages) even need to be a shade of blue though? Just a thought.
--- a/src/gui/log/loglistview.cpp
+++ b/src/gui/log/loglistview.cpp
@@ -115,6 +115,7 @@ LogListView::LogListView(QWidget *parent)
{
setSelectionMode(QAbstractItemView::ExtendedSelection);
setItemDelegate(new LogItemDelegate(this));
+ setStyleSheet(u"selection-background-color: rgb(X, Y, Z);"_qs);
#if defined(Q_OS_MAC)
setAttribute(Qt::WA_MacShowFocusRect, false);
Anyone know how to change the "highlight" bar color or where in the code I should look?
So you are going to override the theme/colors from OS? Not sure that is a good idea...
So you are going to override the theme/colors from OS?
I don't mean to change the actual colour.......just alter it slightly, making it lighter/more transparent.
Does INFO color (the messages) even need to be a shade of blue though? Just a thought.
No, anyway will look in to alternatives for text.
- Being superseded by https://github.com/qbittorrent/qBittorrent/pull/17798