qBittorrent icon indicating copy to clipboard operation
qBittorrent copied to clipboard

Enhance readability in execution log across light/dark themes

Open xavier2k6 opened this issue 1 year ago • 9 comments

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 logs_dark_mode

Closes #15401

xavier2k6 avatar Sep 13 '22 09:09 xavier2k6

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.

thalieht avatar Sep 13 '22 11:09 thalieht

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.

xavier2k6 avatar Sep 13 '22 17:09 xavier2k6

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.

Chocobo1 avatar Sep 14 '22 04:09 Chocobo1

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.

Mazino-Urek avatar Sep 14 '22 07:09 Mazino-Urek

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 green highlighted bright

xavier2k6 avatar Sep 14 '22 11:09 xavier2k6

Anyone know how to change the "highlight" bar color or where in the code I should look?

xavier2k6 avatar Sep 15 '22 10:09 xavier2k6

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);

thalieht avatar Sep 15 '22 16:09 thalieht

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...

Chocobo1 avatar Sep 16 '22 04:09 Chocobo1

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.

xavier2k6 avatar Sep 16 '22 11:09 xavier2k6

  • Being superseded by https://github.com/qbittorrent/qBittorrent/pull/17798

xavier2k6 avatar Sep 30 '22 12:09 xavier2k6