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
Conversation
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; }"); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
|
|
||
// Set dark theme | ||
if (params.darkTheme) { | ||
QFile file(":/qdarkstylesheet.qss"); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 ;)
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
I think you need to change the links colour too. In your screenshot the contrast between dark blue and dark grey colours is marginal. |
I agree with you about links color. |
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; }"); |
There was a problem hiding this comment.
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.
Sorry for ruining this for you but I don't like it. |
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? |
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. |
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. |
I didn't share compiled qBittorrent binaries with dark theme yet, but if you have windows x64, I shared binaries right now through Dropbox. |
Thank you @suratovvlad !!! |
Could you test https://github.com/suratovvlad/qbittorrent-installer/releases please? |
How do i add this style to my qbittorrent? |
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 :/ |
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. |
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 If you would like, you can petition @evsh to add this stylesheet as one of the theming options in [#6698]. |
+1 for black theme |
+1, support a dark theme. Would be very beneficial. |
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.