Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 01-30-2017, 11:13 AM   #1
albertp007
Junior Member
albertp007 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2017
Device: Kindle Voyage
Dark theme in Calibre for Windows 10

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
Attached Thumbnails
Click image for larger version

Name:	DarkCalibre.png
Views:	425
Size:	75.1 KB
ID:	154641  
albertp007 is offline   Reply With Quote
Advert
Old 01-30-2017, 12:08 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 31,312
Karma: 8154029
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
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.
kovidgoyal is offline   Reply With Quote
Old 02-02-2017, 04:05 PM   #3
zakky
Junior Member
zakky began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Feb 2017
Device: Kindle PW3
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)?
zakky is offline   Reply With Quote
Old 02-02-2017, 04:07 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 48,625
Karma: 39003673
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
I suggest you change the blue on grey. It just doesn't work.
JSWolf is offline   Reply With Quote
Old 02-02-2017, 09:31 PM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 31,312
Karma: 8154029
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Best support for colors comes with using the system theme in calibre (Preferences->Look & Feel->User interface style->change it to system default)
kovidgoyal is offline   Reply With Quote
Advert
Old 02-07-2017, 04:22 AM   #6
albertp007
Junior Member
albertp007 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2017
Device: Kindle Voyage
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
albertp007 is offline   Reply With Quote
Old 02-07-2017, 05:44 AM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 31,312
Karma: 8154029
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You need to customize the color theme in windows and change the text area colors to dark -- that will do it.
kovidgoyal is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Theme TOC. Remember theme for each ebook erbilac Calibre 4 07-27-2016 09:20 AM
[THEME] CALIBRE Monstre - beta alfatreze Calibre 7 09-30-2015 12:23 AM
A beautiful theme for Windows antistar Deals, Freebies, and Resources (No Self-Promotion) 8 04-22-2013 01:46 PM
theme source for modern and sdk default theme gshank PocketBook Developer's Corner 6 07-18-2011 04:06 PM
Windows XP Energy Blue Theme TadW Lounge 0 10-31-2004 07:08 PM


All times are GMT -4. The time now is 08:27 PM.


MobileRead.com is a privately owned, operated and funded community.