Mobileread
Dark theme in Calibre for Windows 10
#1  albertp007 01-30-2017, 12:13 PM
Hi all, there was a thread some time back about adding a couple of lines to read in a qss file to style the Calibre GUI. Not sure if anybody has done that already, but I have made a 4-liner change in the source code which hopefully won't break anything (famous last words!)

Basically, you add the environment variable "CALIBRE_QSS_PATH" and set it to be, well, the path of the qss file (absolute or relative to start directory). I took mine from https://github.com/ColinDuquesnoy/QDarkStyleSheet. The side panel on the left with the Authors, Titles, Tags etc is still light though, will need to tweak the qss a little bit. For now, I am just hiding it, I don't use it that often anyways.

If anybody is interested, let me know and I will co-ordinate to check it in. I actually don't know how to create a package so I am still running with CALIBRE_DEVELOP_FROM on. If anybody could point me somewhere, that would be very much appreciated.

Please see attached screenshot.

Cheers,
Albert
DarkCalibre.png 
Reply 

#2  kovidgoyal 01-30-2017, 01:08 PM
calibre (well technically Qt) on windows picks up its colors from the system theme -- so if you change your system theme it should change as well, that would likely work with the Tag Browser (the panel on the left) as well.
Reply 

#3  zakky 02-02-2017, 05:05 PM
Hmmm I have my color selected to red in win 10 and only the bar with buttons to close minimise and resize Calibre is in red, but the rest is still white/lightgrey.
And I'm very interested if there is a way to change theme for whole Calibre to dark?
Can you albertp007 explain me a bit more, how did you change yours (and if it is still working or did it break anything)?
Reply 

#4  JSWolf 02-02-2017, 05:07 PM
I suggest you change the blue on grey. It just doesn't work.
Reply 

#5  kovidgoyal 02-02-2017, 10:31 PM
Best support for colors comes with using the system theme in calibre (Preferences->Look & Feel->User interface style->change it to system default)
Reply 

#6  albertp007 02-07-2017, 05:22 AM
Hi Zakky, I did it by changing a couple of lines of code in a development environment. Those changes are only in my own environment.

Hi Kovid, setting the interface style to system default in Calibre won't change the background to dark. I am running on the Windows 10 anniversary update (1607) which includes an option to switch it to Dark mode. It will change certain elements to have a dark background, but not all. For example. after selecting dark mode, the background for programs like notepad, file explorer etc, including Calibre (with interface style set to system default) are still light. Background color for taskbars and some other elements do go dark, but not all. We have the option to change theme to a high contrast theme, which does turn the background of applications dark, but then it makes the color of every other element looks not very pleasant. I read from somewhere that someone manage to change the background color of many applications to dark by changing settings in the registry, but that is a path I don't want to go down. This is more like a Windows problem which doesn't give you an easy way to theme it down to individual widgets, unlike Linux. Hence my attempt to make the qss-related change . If you have other suggestions, please do let me know, I am more than eager to try out.

Hi JSWolf, yeah, agree, will need to spend some time figuring out which element it is in the qss file and make the change accordingly.

Cheers,
Albert
Reply 

#7  kovidgoyal 02-07-2017, 06:44 AM
You need to customize the color theme in windows and change the text area colors to dark -- that will do it.
Reply 

#8  jpirez 02-26-2019, 08:59 AM
Quote kovidgoyal
You need to customize the color theme in windows and change the text area colors to dark -- that will do it.
I would like to enable the dark theme just in Calibre but not in Windows in general.

Would it be possible to implement a switch in calibre to opt for the dark theme in the app only?

Regards,

Jose
Reply 

#9  gootube2000 10-05-2019, 02:59 PM
Quote kovidgoyal
You need to customize the color theme in windows and change the text area colors to dark -- that will do it.
I can confirm with utmost certainty that this is not in any way possible in Windows 10. It has an option for a "dark theme," but this theme only applies to Universal Windows Platform applications and the file explorer. No other applications, Calibre included, are affected by this setting, and no setting in Windows can affect their colors (much unlike one can in most Linux distros). This is why there are still threads asking about this.
Reply 

#10  kovidgoyal 10-05-2019, 09:52 PM
Quote gootube2000
I can confirm with utmost certainty that this is not in any way possible in Windows 10. It has an option for a "dark theme," but this theme only applies to Universal Windows Platform applications and the file explorer. No other applications, Calibre included, are affected by this setting, and no setting in Windows can affect their colors (much unlike one can in most Linux distros). This is why there are still threads asking about this.
Change the system color theme the one in the old style control panel, not th dark mode toggle for metro apps.
Reply 

  Next »  Last »  (1/3)
Today's Posts | Search this Thread | Login | Register