qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
27.85k stars 3.93k forks source link

Windows 10 1903+ Dark "App" Mode (Native Support) #17081

Open aka-0x4C3DD opened 2 years ago

aka-0x4C3DD commented 2 years ago

Suggestion

Dark Mode for qBittorrent.

Use case

For people with eye defects, it won't serve as a flash bang.

Extra info/examples/attachments

No response

adem4ik commented 2 years ago

I guess it is needed only for Windows' systems, as macOS and Linux already support it out of box.

AlexSnowLeo commented 2 years ago

Hey @aka-0x4C3DD I'm also a fan of the dark theme on Windows. Maybe this will help you. https://github.com/maboroshin/qBittorrentDarktheme

qBittorrent will look like this for example:

изображение

изображение

abcfy2 commented 2 years ago

I guess it is needed only for Windows' systems, as macOS and Linux already support it out of box.

I don't think Linux support dark mode for Qt out of box. I tried both KDE and XFCE desktop environment, though I set a dark theme globally, qbittorrent will choose a light mode:

image

adem4ik commented 2 years ago

@abcfy2 The problem must be on your side. Your screen shows unofficial qB build called "Enhanced Edition". I guess your should report the problem to its devs: https://github.com/c0re100/qBittorrent-Enhanced-Edition

With official client I have dark mode working on my Manjaro KDE for a long time: image

abcfy2 commented 2 years ago

I also tried official AppImage, but still no luck:

image

abcfy2 commented 2 years ago

And I installed qbittorrent via sudo pacman -S qbittorrent, still this issue:

image

KousikAdhikary commented 2 years ago

Yes an official Dark Theme for Windows will be much appreciated.

Amandaville commented 2 years ago

Dark mode and themes are not working on MX Linux XFCE

ghost commented 1 year ago

I wouldn't say no to auto dark mode option aside with a dark theme.

jupiter104 commented 1 year ago

We need this urgently. 99% of my friends use dark mode. I don't know why qbt comes with light mode by default.

maboroshin commented 1 year ago

qBittorrent have basic dark theme. What files we need to edit to change this Native Theme?

Color issues are common with light themes. Don't use extreme colors #000000 or #FFFFFFFF, 255 or 0. #11111111, #FAFAFAFA would be better. The same is for icon colors. Since icons are svc, it is easy to change the color as a string.

Also we would like to change the theme without restarting qBittorrent.

Current 4.5.0 Native Dark Theme: image

I saw previous issue https://github.com/qbittorrent/qBittorrent/pull/13952#issuecomment-743341836

With the following statement, qBittorrent switches between light and dark themes according to the system settings without restarting qBittorrent.

I think Qt can be buggy with color overrides. But difficult to read text seems to be limited to the options dialog at this theme: https://github.com/qbittorrent/qBittorrent/pull/13952#issuecomment-1008637439

qt.conf (This file placed in the same folder as qbittorrent.exe) :

[Platforms]
darkmode=2
Hlsgs commented 1 year ago

Prior to version 4.5.3, one could get a rudimetary dark mode in Windows by adding the QT_QPA_PLATFORM = windows:darkmode=2 environment variable or using the corresponding command line parameter to start the application. This is no longer the case, presumably because of the update to Qt v6.5.1.

However, this big Qt upgrade being done merits reopening this neverending discussion, considering the improvements to dark mode handling that came with v6.5. I'm hoping this would also mitigate the dreaded issue of the white flashing main window when restoring qBT from the system tray. It's been mentioned around.

Coming at this myself from the visual impairment perspective, I would like to add a request(for which I will create a separate issue, if instructed): it would be great if both the default light and the presumptive native dark mode had the option to not color the text of torrents according to their status, but rather rely solely on their icons for that.

xavier2k6 commented 1 year ago

@Hlsgs If you read through Dark Mode on Windows 11 with Qt 6.5 you will notice below:

We are not changing the default style in Qt on Windows, so by default, your application will use the Windows Vista style, which will use the light system palette even on a Windows 11 system running with a dark theme.

@glassez You might also be interested in above quote from Qt.

So, there have been changes from how Qt used to provide a sort of dark mode prior to Qt 6.5...it was meant to have been reverted/fixed in Qt 6.5.1 but doesn't seem to be. (We still need to use fusion style)


If you or anyone else would like to experiment with how "Dark Mode Support on Windows" is progressing & how the text colors etc. can now be changed in transfer list by user - download the 4.6.0alpha1 Qt6 Build & you can use below command via command prompt:

qbittorrent -style fusion

Screenshot 2023-05-29 184105

glassez commented 1 year ago

you can use below command via command prompt:

qbittorrent -style fusion -platform windows:darkmode=2

IIRC, qbittorrent -style fusion is enough with Qt 6.5.x

xavier2k6 commented 1 year ago

you can use below command via command prompt: qbittorrent -style fusion -platform windows:darkmode=2

IIRC, qbittorrent -style fusion is enough with Qt 6.5.x

So it seems....qbittorrent -style fusion -platform windows:darkmode=1 seems to also only provide light mode whereas before it would give a dark mode but keep title bar window light?!

Anyway, will adjust https://github.com/qbittorrent/qBittorrent/issues/17081#issuecomment-1567352582

maboroshin commented 1 year ago

This may be outdated information. As of 2022, the color of the Windows title bar was changed through the OS settings (Win10) or other app (MicaForEveryone for Win11).

Detail: https://github.com/maboroshin/qBittorrentDarktheme/issues/19#issuecomment-1087499340

Hlsgs commented 1 year ago

@xavier2k6 Thank you for all the great info. Didn't know about using the fusion style and was unaware of all the work that's getting done in 4.6.0 regarding colors. Just tested fusion in both 4.5.3 and 4.6.0 and it's basically all that I was asking about. Awesome! Couple of questions:

glassez commented 1 year ago
  • What's the plan regarding 4.6.0? Will it default to fusion?

In v4.6 I intend to raise minimum supported Qt version to 6.5 on Windows and use Fusion style by default (at least on Windows 11, unsure about Windows 10).

xavier2k6 commented 1 year ago

@glassez has already addressed the default style option, but just to give a little more context:

From the Qt Blog (Above):

The Fusion style is our preferred style for Windows 11. It looks good with dark and light palette

https://www.qt.io/blog/dark-mode-on-windows-11-with-qt-6.5#:~:text=The%20Fusion%20style%20is%20our%20preferred%20style%20for%20Windows%2011.%20It%20looks%20good%20with%20dark%20and%20light%20palette

  • Any caveats with using fusion with 4.5.3?

None that I have observed & I've used fusion style for a long time....it also addresses some checkbox issues etc......now there are caveats with "Dark Mode Support" still & these will be resolved over time.

Hlsgs commented 1 year ago

The Fusion style is our preferred style for Windows 11. It looks good with dark and light palette

Are there any issues specifically with fusion on Windows 10? If not, and seeing as you're also dropping support for older Windows versions(good riddance), I don't see why you would bother with supporting anything but fusion going forward on both W10 and W11.

xavier2k6 commented 1 year ago

Are there any issues specifically with fusion on Windows 10?

Again none observed & as I've pointed out numerous times in other tickets...it has other benefits!


Qt have been suggesting/recommending fusion even since Qt5 especially for High DPI Support as I mentioned in https://github.com/qbittorrent/qBittorrent/issues/13603#issuecomment-768308736

High DPI Support in Qt

While the macOS style fully supports high-DPI, the Windows desktop style currently has some limitations with certain scale factors. In these cases, consider using the Fusion style instead, which supports high-DPI in all cases.

ref: https://doc.qt.io/qt-5/highdpi.html#:~:text=Windows%20desktop%20style%20currently%20has%20some%20limitations%20with%20certain%20scale%20factors.%20In%20these%20cases,%20consider%20using%20the%20Fusion%20style%20instead

Hlsgs commented 1 year ago

Thank you for all the great info. Just one more quick question: can fusion be enabled via qt.conf or does it have to be the command parameter?

xavier2k6 commented 1 year ago

Thank you for all the great info. Just one more quick question: can fusion be enabled via qt.conf or does it have to be the command parameter?

I haven't really looked in to that, sorry.

Here's an example benefit IMO of going from Qt default (left screenshot) to fusion (right screenshot)

(Notice the checkboxes & the keyboard shortcuts)

Screenshot 2023-05-29 205336Screenshot 2023-05-29 205412

xavier2k6 commented 1 year ago

@Hlsgs Not only does fusion style present things properly or make the whole look & feel of qBittorrent better like I pointed out in https://github.com/qbittorrent/qBittorrent/issues/17081#issuecomment-1567470921 but it will also address another issue like "Use alternating row colors" not being displayed correctly (at least on windows 10)

Screenshot 2023-05-31 164814

Here's some more info on Qt Styles -> https://doc.qt.io/qt-6/gallery.html

@glassez Has also now created a Use Fusion style on Windows 10+ PR so it will be the default in a future release...

Hlsgs commented 1 year ago

@xavier2k6 Tried it and I agree. Very good to see it as default for Windows 10 as well going forward. I, however, will have to continue using a theme until 4.6.0 is out with support for removing colors from torrents' text. Many of the colors are illegible for me in dark mode and light mode is out of the question. Btw, do you think a checkbox in options to remove color from torrents with all statuses for 4.5.x as a stop-gap solution would be something the developers would consider? Thank you again for the all the info!

xavier2k6 commented 1 year ago

Btw, do you think a checkbox in options to remove color from torrents with all statuses for 4.5.x as a stop-gap solution would be something the developers would consider?

Not at the moment anyway.

Lucatir commented 1 year ago

@xavier2k6 I, however, will have to continue using a theme until 4.6.0 is out with support for removing colors from torrents' text. Many of the colors are illegible for me in dark mode and light mode is out of the question.

My comment might come a bit out of the left field, but if you, or anyone reading this, is on Windows 11 22H1 or newer, you might want to give the Fluent theme a try:

qbittorrent

The preview image showcases both a dark and a light theme, so no worries that it mixes them in the UI. It will definitely be in a single color scheme of one's choice. 😂

Here's the link: https://github.com/witalihirsch/qBitTorrent-fluent-theme/

PS: If one wants it to look exactly like the preview image (besides the splitting of dark and light), one also needs to use the application called "Mica everywhere". Without it, it won't probably look as good. More details at the link above.

Apologies if I derailed this issue topic a bit and apologies for any unwanted emails you'll get as a notification from my necro bump. 🙏

Solarunit commented 1 year ago

Another vote for the internal built-in dark theme, I hope it would be a true dark theme, not an ugly grey one.

Depending on various Linux DEs in some cases it's impossible to apply a system dark theme to qbittorrent and internal dark theme is missing in the qbittorrent settings.

masterwishx commented 1 year ago

is builded dark mode avalible in docker from webui ?

xavier2k6 commented 1 year ago

is builded dark mode avalible in docker from webui ?

I don't believe so, there's currently no dark mode support in WebUI.

There's a feature request open though in #18886

masterwishx commented 1 year ago

I don't believe so, there's currently no dark mode support in WebUI.

Will be cool to have it in webui, using dark reader for now

Kas152 commented 12 months ago

Maybe too much to ask, but a good darkmode would be great to have for sure. And then specifically an automated one that switches with the windows (11) theme. Could that be done? I'm unsing version 4.6 of qbittorrent. All this hassle to install a diffirent theme is a bit much for me. Just an automated native light/dark theme would be great!

mzso commented 11 months ago

@Solarunit

Another vote for the internal built-in dark theme, I hope it would be a true dark theme, not an ugly grey one.

Dark grey IS dark. Besides having black backgrounds is also rather harsh on the eyes.

mzso commented 11 months ago

People mention "-style fusion" in this thread. Are there any others that can be tried out?

mzso commented 11 months ago

@maboroshin

[Platforms] darkmode=2

Putting this in qt.conf doesn't do anything here. Is this not supposed to work anymore? (I also tried adding style=fusion to this section as well.)

glassez commented 11 months ago

Windows Vista style, used on Windows by default, doesn't support dark mode. When you enable darkmode=2 (via command line, environment variable or qt.conf) Qt handles Windows dark mode by automatically change style to "legacy" Windows. This doesn't seem to work anymore, starting with Qt 6.5, so you need to manially activate some style that supports dark mode. In a future version, we are testing Fusion style to be used by default.

masterwishx commented 11 months ago

In a future version, we are testing Fusion style to be used by default.

Also for WebUI ?

glassez commented 11 months ago

In a future version, we are testing Fusion style to be used by default.

Also for WebUI ?

No. It has nothing to do with WebUI. Maybe something like #19847 will be finished after all...

Kas152 commented 11 months ago

That would be awesome 👍🏻. Just a simple, effective and automated dark mode, native to qbittorrent. So that you only have to tick a box to either enable or disable the automatic dark mode.

xavier2k6 commented 11 months ago

Dark Mode Requirements:

Example:

Should you wish to enable Dark Mode & run Official qBittorrent 4.6.0 (Qt 6.4.3)

  1. Open command prompt
  2. Run/Issue command cd C:\Program Files\qBittorrent in this command prompt or where "qBittorrent" is installed.
  3. Run/Issue command qbittorrent -style fusion -platform windows:darkmode=2 (Command used for any qBittorrent based builds of Qt 5.15.x or <=Qt 6.4 Series) Or
  4. Run/Issue command qbittorrent -style fusion for any Official qBittorrent Qt 6.5 Series based build (Qt are using the equivalent darkmode=2 switch as default as of Qt 6.5 Series.)

(-style fusion is a Qt recommended style command)

NONE of these commands nor the need to run qBittorrent through command prompt or with associated shortcuts will be necessary in a future release with Dark Mode on Windows Support


Are there caveats to current Dark Mode support? - Yes

Are these caveats being worked on by the qBittorrent team? - Yes & No, some caveats are introduced by upstream Qt & require them to fix eg. QTBUG-112879

Why is Windows 10 1903+ required when min supported platform of Qt 5 is Windows 10 21H2 & Qt 6.x is Windows 10 1809+?

darkmode=[0|1|2] controls how Qt responds to the activation of the Dark Mode for applications introduced in Windows 10 1903 (since Qt 5.15).

As of Qt 6.5, the default value is 2

https://doc.qt.io/qt-6/qguiapplication.html#platform-specific-arguments

mzso commented 11 months ago

@xavier2k6 Why don't these work when I add them to the qt.conf file? The file is there to begin with. And it seems like this is the sort of thing it was meant for.

xavier2k6 commented 11 months ago

only darkmode switch can be used in qt.conf as long as it's set right but it's best to stick with my approach above.

Kas152 commented 11 months ago

This is a perfect example why I plead for an automated, no nonsense, dark mode. So that everyone can use it and not only the ones who are computer knowledgeable.

mzso commented 11 months ago

@Kas152 I guess they only want to release it if it's polished/bug-free.

By the way. Editing the qt.conf also works, as I found. You need to uncomment and change the extant WindowsArguments line. (or create a new one) Such as: WindowsArguments = darkmode=2

I guess changing style does not matter, since no-one mentioned any other than "fusion", that can be used.

xavier2k6 commented 11 months ago

I guess changing style does not matter, since no-one mentioned any other than "fusion", that can be used.

It does matter....read https://github.com/qbittorrent/qBittorrent/issues/17081#issuecomment-1800271828 especially Platform-Specific Arguments link in relation to dark mode switches!!

Also see screenshots from https://github.com/qbittorrent/qBittorrent/issues/17081#issuecomment-1567470921

It is also recommended for proper High DPI Support

https://doc.qt.io/qt-5/highdpi.html#:~:text=Windows%20desktop%20style%20currently%20has%20some%20limitations%20with%20certain%20scale%20factors.%20In%20these%20cases,%20consider%20using%20the%20Fusion%20style%20instead

Also read https://www.qt.io/blog/dark-mode-on-windows-11-with-qt-6.5

I've mentioned this countless times in different various tickets etc.

Styles that are available: Windows style (legacy) Windows Vista style (default) Fusion style

There's other styles but they're for macOS


@Kas152 It will me automated when implemented in an official release & we use Qt 6.5+

Qt 6.6.1 will bring a required fix from QTBUG-112879

Although Qt 6.5.4 will also have that fix, we will not be able to use it for at least a year due to it being a LTS Commercial Release

mzso commented 11 months ago

@xavier2k6 I see what you mean. The main thing is the alternating rows, that only works with fusion.

Qt 6.6.1 will bring a required fix from QTBUG-112879

Though with QB 4.6 using fusion on Win10 I don't see such bug, or any others. So dark theme might as well have been enabled.

Solarunit commented 11 months ago

@mzso

@Solarunit

Another vote for the internal built-in dark theme, I hope it would be a true dark theme, not an ugly grey one.

Dark grey IS dark. Besides having black backgrounds is also rather harsh on the eyes.

What kind of dark grey we are talking about? Is there official dark theme? Can you share some screenshots? My point was that there are many apps that comes with dark theme option, but that dark theme is very ugly, because they are using light grey colors.

xavier2k6 commented 11 months ago

Though with QB 4.6 using fusion on Win10 I don't see such bug, or any others.

That's because qBittorrent 4.6.0 uses Qt 6.4.3.... the bug was introduced in Qt 6.5 Series, we used it in a release or two but we had to revert because of caveats found & Qt 6.5.x caused crashes on macOS.

Screenshot 2023-11-08 121035

So dark theme might as well have been enabled.

All good things to those who wait.......

luzpaz commented 11 months ago

@xavier2k6 are we marking this a qt bug and watiing for upstream ?

xavier2k6 commented 11 months ago

are we marking this a qt bug and watiing for upstream ?

I don't think there's a need...TBH, but I won't object either.