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 non-native dark theme #5076

Closed
wants to merge 1 commit into from
Closed

Conversation

suratovvlad
Copy link

I've added dark theme, that Windows (and not only) users can use dark theme
for their version of qbittorrent. Users should run application with
"--dark-theme" option to enable dark style.

I've found the style sheet that make qt widgets darker. You can find the
original project with stylesheets on github project page.

I've added dark theme, that Windows (and not only) can use dark theme
for their version of qbittorrent. Users should run application with
"--dark-theme" option to enable dark style.

I've found the style sheet that make qt widgets darker. You can find the
original project with stylesheets on Github
(https://github.com/ColinDuquesnoy/QDarkStyleSheet).
@@ -50,8 +50,6 @@
StatusBar::StatusBar(QStatusBar *bar)
: m_bar(bar)
{
qApp->setStyleSheet("QStatusBar::item { border-width: 0; }");
Copy link
Member

Choose a reason for hiding this comment

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

I just did the move in e35a7ef. Placing here is more intuitive IMO, or, this is blocking this PR?

Copy link
Author

Choose a reason for hiding this comment

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

I agree with you about intuitive, but it is blocking dark style sheets - I tested it several times with and without it)

@Chocobo1
Copy link
Member

Chocobo1 commented Apr 4, 2016

  1. This is actually a good idea, but please provide screenshot (as stated in https://github.com/qbittorrent/qBittorrent/blob/master/CONTRIBUTING.md)
  2. I think the switch should not be done in cmdline args, but as a option var accessed via Preference class.


// Set dark theme
if (params.darkTheme) {
QFile file(":/qdarkstylesheet.qss");
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't it be more useful to put the stylesheet outside of the application binary to allow for possible user edits?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, It would be more useful, but we must guarantee that stylesheet will be deployed with application separately. Should it be in %Some_user_settings_path% or in app directory?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm sorry but I'm not familiar with Windows filesystem layout. Certainly application directory is a bad place, since in general user shall not be able to edit files there. It might have sense to keep the file in resources and copy it (without overwriting) into the user directory at start up.

Although the maintainer in one of the PRs told me that he objects colour customisation. Be ready ;)

Copy link
Author

Choose a reason for hiding this comment

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

Does "to objecting" mean "to protesting"? So, when I finish stylesheet integration, may it won't be approved like a customization patch?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know :) I'm into customisations and support the idea that applications styles have to be controllable by a user. @sledgehammer999 ? Could you comment on this, please?

@suratovvlad
Copy link
Author

This is screenshot of dark qBittorrent in Windows:

2016-04-04 7

@zeule
Copy link
Contributor

zeule commented Apr 4, 2016

I think you need to change the links colour too. In your screenshot the contrast between dark blue and dark grey colours is marginal.

@suratovvlad
Copy link
Author

I agree with you about links color.

@suratovvlad
Copy link
Author

Ok, thank you for quick review and quick answer..

I need more time (about two-three days) to finish stylesheet integration to Preferences class and fix some style bugs like a missing resources, colours etc..

@@ -275,6 +275,8 @@ MainWindow::MainWindow(QWidget *parent)
createKeyboardShortcuts();
// Create status bar
status_bar = new StatusBar(QMainWindow::statusBar());
this->setStyleSheet("QStatusBar::item { border-width: 0; }");
Copy link
Member

Choose a reason for hiding this comment

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

This is C++! this is implicit. No need to use it everywhere.

@sledgehammer999
Copy link
Member

Sorry for ruining this for you but I don't like it.
I want the application to have a native look on all platforms. I don't like supporting themes(or similar). The only minor exception I could consider is the transferlist colors but I am not very sure about that either.
If user uses a dark theme for his system qBittorrent will use it too.

@suratovvlad
Copy link
Author

Ok... It is sad, to hear it, but I respect your opinion. Thank you for the answer!

Will you not object if I fork qbittorrent and build it for myself with dark theme without contributing?

@sledgehammer999
Copy link
Member

Will you not object if I fork qbittorrent and build it for myself with dark theme without contributing?

Well this is open source. I can't really ban you from doing your thing. But if you want to distribute it, I think you cannot use the name "qBittorrent".

I am sorry for the time you put into it. But if you have other things you want to contribute I can surely accept them.

@geotavros
Copy link

I think you could give users a choice to select the theme. What's bad about it? The default installation can be native, but it would be cool to change the theme through Preferences dialog. For example Visual Studio 2013 dark theme is absolutely lovely. I also like Steam app theme. And I like the theme which suratovvlad made.
Btw, suratovvlad, where can we download your compiled dark themed qBittorrent? I hope you can make a fork and compile an executable which can be installed or copied into regular qBittorrent installation or something like that.

@suratovvlad
Copy link
Author

I didn't share compiled qBittorrent binaries with dark theme yet, but if you have windows x64, I shared binaries right now through Dropbox.
Anyway, I forked it several months ago and updating to main once at month, so, anyone can download sources from my GitHub and compile it for any supported OS.
@geotavros, thanks for your request, we will think about sharing compiled version more for different OS.

@exalented
Copy link

Thank you @suratovvlad !!!

@LordNyriox LordNyriox mentioned this pull request Mar 15, 2017
@suratovvlad
Copy link
Author

@LordNyriox LordNyriox mentioned this pull request May 14, 2017
12 tasks
@Balls0fSteel Balls0fSteel mentioned this pull request Aug 6, 2017
@Bhaalspawn
Copy link

How do i add this style to my qbittorrent?

@Opa-
Copy link

Opa- commented Aug 16, 2017

Would be nice to let the user decide if he wants to change the theme. Opening qBitorrent at 4 AM hurts so much when this is the only application not black/dark themed :/

@Zentriert
Copy link

Can we please have this? :) ... I also agree about it being one of my only not black/dark themed software and it also kinda kills my eyes at night time.

I also have a 50" TV I run qBittorrent on .. lol. Very bright at night even with f.lux.

@LordNyriox
Copy link
Contributor

@Zentriert:

Can we please have this?

At the time this PR was rejected, @sledgehammer999 was stubbornly refusing to allow theming support in qBittorrent (my understanding is that he preferred OS windowing consistency wherever possible).

During development of 3.4.0alpha, however, @sledgehammer999 reversed his stance, and there is now a major PR to add adaptive theming.

If you would like, you can petition @evsh to add this stylesheet as one of the theming options in [#6698].

@CryptoSiD
Copy link

+1 for black theme

@n-o-o-b
Copy link

n-o-o-b commented Jan 9, 2018

+1, support a dark theme. Would be very beneficial.

@MPeti1
Copy link

MPeti1 commented Dec 15, 2019

Sorry for ruining this for you but I don't like it.
I want the application to have a native look on all platforms. I don't like supporting themes(or similar). The only minor exception I could consider is the transferlist colors but I am not very sure about that either.
If user uses a dark theme for his system qBittorrent will use it too.

Not really? 3 years have passed since the dark theme for Windows 10 came out.
image

In the time of writing of your comment the Anniversary Update wasn't released, but a few months later it was along with the dark theme. Currently not just UWP apps, but the basic file manager, paint.net, and even Total Commander supports dark themes, just to name a few.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet