Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dark theme for WebUI #19901

Merged
merged 48 commits into from
Dec 12, 2023
Merged

Add dark theme for WebUI #19901

merged 48 commits into from
Dec 12, 2023

Conversation

d47081
Copy link
Contributor

@d47081 d47081 commented Nov 8, 2023

Created common branch for

#19888
#19847

Feature request:

#19844

All next contribution will be here:

https://github.com/d47081/qBittorrent/tree/adaptive-webui

Copy link
Member

@Chocobo1 Chocobo1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also you might want to run the CI checks locally so you don't need to wait for our CI.
You'll need to install nodejs & npm: https://nodejs.org/en/download/
After installation, open a command line at src/webui/www directory and run npm install.
Then you can run the checks: npm run lint && npm run format

src/webui/www/private/css/palette.css Show resolved Hide resolved
src/webui/www/private/css/palette.css Outdated Show resolved Hide resolved
src/webui/www/public/index.html Outdated Show resolved Hide resolved
src/webui/www/webui.qrc Outdated Show resolved Hide resolved
src/webui/www/private/css/Layout.css Outdated Show resolved Hide resolved
src/webui/www/private/css/Layout.css Outdated Show resolved Hide resolved
src/webui/www/private/css/style.css Show resolved Hide resolved
@thalieht
Copy link
Contributor

Please PR your palette suggestions to

Sorry i don't have any suggestions about colors.

Copy link
Member

@Chocobo1 Chocobo1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@d47081
This PR has no other task pending and is ready to merge, right?

In addition to my other comments, I intend to make the following changes (all by myself). I hope you'll be ok with it since it will apply on your git branch:

  1. Move vanillaSelectBox.css out of lib directory
  2. Revert changes to public folder and rely on <meta name="color-scheme" content="dark light"> instead.

If there are no objections, I'll apply the changes in the next few days and afterwards approve/merge it. Please leave this PR branch as is, I'll handle the rest.

src/webui/www/private/scripts/lib/vanillaSelectBox.js Outdated Show resolved Hide resolved
src/webui/www/private/css/palette.css Outdated Show resolved Hide resolved
src/webui/www/private/css/palette.css Outdated Show resolved Hide resolved
src/webui/www/private/css/palette.css Outdated Show resolved Hide resolved
@d47081
Copy link
Contributor Author

d47081 commented Dec 7, 2023

This PR has no other task pending and is ready to merge, right?

I'm using this implementation about month in dark mode and found no problems there.

@thalieht said there is low contrast, but on my screen (iMac) - it's enough for me. Maybe it depend from monitor settings.

I'm also not designer, just grab previous blue/orange palette and adapted it (just reduced saturation to make not such toxic for eyes)

@Chocobo1 okay, just let me know if something needed from my side

@Chocobo1
Copy link
Member

If there are no objections, I'll apply the changes in the next few days and afterwards approve/merge it.

@qbittorrent/bug-handlers
I've made the changes and tested it. This PR lay down the foundation for dark theme and the color palette can be fine tuned by others later. I consider this PR ready for approval and merge unless there are functionality broken. Please take a look.

Contrast between text and background when hovering over a line (the one in the middle) isn't very good in dark theme (firefox) and the same applies for the login fields.

Now the login page (mostly) uses color palette from the browser. IMO this page doesn't need to be heavily customized unlike the main window page (after login).
I'm mostly fine with the dark theme but I think the contrast for light theme is a bit low for me. Anyway it can be revised later.

@Chocobo1 Chocobo1 merged commit 9d90141 into qbittorrent:master Dec 12, 2023
12 of 13 checks passed
@Chocobo1 Chocobo1 changed the title Adaptive WebUI Add dark theme for WebUI Dec 12, 2023
@Chocobo1
Copy link
Member

@d47081
Thank you!

@Mazino-Urek
Copy link
Contributor

Can it be used to design a dark theme for the native app?

@d47081
Copy link
Contributor Author

d47081 commented Dec 12, 2023

@Chocobo1 with pleasure!

Can it be used to design a dark theme for the native app?

Web UI is different component and not related with desktop theme

@xavier2k6 xavier2k6 mentioned this pull request Dec 18, 2023
@spirillen
Copy link

How do you enable this dark mode? I'm using qb-nox and I don't see the option anywhere.

qBittorrent v5.0.0alpha1 Web UI (64-bit) ((linux))

image

@d47081
Copy link
Contributor Author

d47081 commented Jan 13, 2024

It is environment-dependent, plus the skin at your screen looks cached

@spirillen
Copy link

It is environment-dependent

?? Not following you @d47081

skin at your screen looks cached

Should not be, have reloaded with ctrl + shift + r and ctrl + f5 so it should be the fresh one.

@zero77
Copy link

zero77 commented Jan 14, 2024

I am getting the same and i have use DuckDuckGo as an example to show the dark theme works on other websites.
2024-1

@Aleksman4o
Copy link

Aleksman4o commented Jan 14, 2024

Nice idea with dark theme, but why there so huge paddings? Default padding was better. Also progressbar can be fullheight. All together it looks weird.

@spirillen
Copy link

I am getting the same and i have use DuckDuckGo as an example to show the dark theme works on other websites. 2024-1

And My Firefox-esr do not send info in light/dark theme... so should be a manual switch under settings

@asaf400
Copy link

asaf400 commented Oct 2, 2024

Thanks for the merge, I like the official UI so I never switched to alternative Web UIs,
and at night using WebUI on the TV [HTPC] always burned my eyes 😅, but not anymore 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Look and feel Affect UI "Look and feel" only without changing the logic WebUI WebUI-related issues/changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants