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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-10-2018, 10:19 AM   #1
Entry20
O
Entry20 began at the beginning.
 
Entry20's Avatar
 
Posts: 17
Karma: 10
Join Date: Mar 2018
Device: Kindle Paperwhite - 7th Generation
Problem with windows dark themes and File preview

I've been using a dark theme on my windows for a long time and today I tried for the first time the editor. It didn't work that well as I can't see the preview/results.

See image (I can't see the text because it's on a dark background from the windows theme):

Click image for larger version

Name:	dmBM6d2.jpg
Views:	358
Size:	153.6 KB
ID:	162736

---------------

This is how it could be fixed (it's something I've edited fast in paint.net, so it's a concept/mockup) (so I guess it's a bug / feature request):

Click image for larger version

Name:	DlW9alq.jpg
Views:	380
Size:	234.3 KB
ID:	162737

Thank you!

Last edited by BetterRed; 03-10-2018 at 05:49 PM. Reason: Replace remotely hosted oversize images with locally hosted clickable thumbnails
Entry20 is offline   Reply With Quote
Old 03-10-2018, 10:25 AM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
does your book FORCE the text color to: color:black ?
That might stop auto reversal (white on black)
theducks is online now   Reply With Quote
Advert
Old 03-10-2018, 10:31 AM   #3
Entry20
O
Entry20 began at the beginning.
 
Entry20's Avatar
 
Posts: 17
Karma: 10
Join Date: Mar 2018
Device: Kindle Paperwhite - 7th Generation
Quote:
Originally Posted by theducks View Post
does your book FORCE the text color to: color:black ?
That might stop auto reversal (white on black)
No, there is no css for color (background / text color).


The problem is that the default color for text is black for both editor and a kindle (black text on white background).

What happens for me is that I have a dark windows theme I use and the text it results in black text (from editor/calibre) on dark gray background (from theme).

The only solution is to change my theme to a white/default windows theme. But I thought that I might suggest this.
Entry20 is offline   Reply With Quote
Old 03-10-2018, 11:10 AM   #4
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
Have you tried changing the color scheme in the editor settings?

Open book in Editor
Hit CTRL-P (Edit/Preferences)
Choose Editor Settings
Choose Color Scheme
deback is offline   Reply With Quote
Old 03-10-2018, 11:35 AM   #5
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
You need to look for "Normal" in your color scheme
Attached Thumbnails
Click image for larger version

Name:	calEdColSchemes.PNG
Views:	319
Size:	207.9 KB
ID:	162731  
Divingduck is offline   Reply With Quote
Advert
Old 03-10-2018, 11:45 AM   #6
Entry20
O
Entry20 began at the beginning.
 
Entry20's Avatar
 
Posts: 17
Karma: 10
Join Date: Mar 2018
Device: Kindle Paperwhite - 7th Generation
Unhappy

Quote:
Originally Posted by deback View Post
Have you tried changing the color scheme in the editor settings?

Open book in Editor
Hit CTRL-P (Edit/Preferences)
Choose Editor Settings
Choose Color Scheme
Quote:
Originally Posted by Divingduck View Post
You need to look for "Normal" in your color scheme
The color scheme changes only the code area/box (where you type your html/css). I want to change the background color of the File preview.
Entry20 is offline   Reply With Quote
Old 03-10-2018, 12:06 PM   #7
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Yes, you are right. There is no entry for it.

Edit:
But... there should be no entry for a preview because it should show what is controlled from a CSS
Edit2:
Don't know if this is an error or simply a windows themes issue. Good to know and point to it here.

Last edited by Divingduck; 03-10-2018 at 12:23 PM.
Divingduck is offline   Reply With Quote
Old 03-10-2018, 12:22 PM   #8
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Divingduck View Post
Yes, you are right. There is no entry for it.

Edit:
But... there should be no entry for a preview because it should show what is controlled from a CSS
Absolutely sure, there is no entry somewhere in your CSS?
Good catch "Preview"
So the 'bug', might be that it partially follows the Theme. Black on Grey
theducks is online now   Reply With Quote
Old 03-10-2018, 12:25 PM   #9
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
It took a while that the picture arrived to brain
Divingduck is offline   Reply With Quote
Old 03-10-2018, 01:17 PM   #10
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: 43,773
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
File preview colors are controlled by CSS, presumably your book has foreground color defined to black. Use either Inspect or the Live CSS tools to see where the colors is coming from. As far as I know, the editor does not itself define any colors.
kovidgoyal is online now   Reply With Quote
Old 03-10-2018, 11:20 PM   #11
Entry20
O
Entry20 began at the beginning.
 
Entry20's Avatar
 
Posts: 17
Karma: 10
Join Date: Mar 2018
Device: Kindle Paperwhite - 7th Generation
Quote:
Originally Posted by kovidgoyal View Post
File preview colors are controlled by CSS, presumably your book has foreground color defined to black. Use either Inspect or the Live CSS tools to see where the colors is coming from. As far as I know, the editor does not itself define any colors.

That's right, but what's the default color of a page when you write it without style? It should be black on white background. In the calibre editor the default text color is black (CORRECT) and the background is transparent/driven by the window color which should not be like that.
Imagine going in the web browser (google chrome / opera / IE) and seeing all the pages with the background driven by the user's theme color (so those pages that don't have a backgound: white / background-color: white will have a dark background, that doesn't make sense, the theme should not change the software important part like the page).

I don't need to use Inspect as there is no value (background/background-color) added for the dark background. The background comes from the windows theme as the theme changes every software window (colors).

A simple fix would be to code in Calibre (if you have time) the background of the File preview to be white by default and black text by default. That would help a lot of people that use custom windows themes.

This is where you change the windows theme colors (so in my case dark background + white text instead of default white background + black text):



So this happens if you change the window color background:




So the summarize, the File preview background should be by default white background + black text and should not be changed by any theme. Just like google chrome, opera, etc. The user's windows theme doesn't change google.com background to dark grey (even if they didn't used background-color: white).
.

Last edited by Entry20; 03-10-2018 at 11:39 PM.
Entry20 is offline   Reply With Quote
Old 03-10-2018, 11:59 PM   #12
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: 43,773
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There is no default color coded in the editor, and adding one would be wrong, since it would conflict with the css defined in the book. Read what I said again. I did not ask you to check the background color, I asked you to check the foreground color. Obviously there is no background color, since the used background color comes from the theme colors. The question is why is there a foreground color.
kovidgoyal is online now   Reply With Quote
Old 03-11-2018, 01:18 AM   #13
Entry20
O
Entry20 began at the beginning.
 
Entry20's Avatar
 
Posts: 17
Karma: 10
Join Date: Mar 2018
Device: Kindle Paperwhite - 7th Generation
Quote:
Originally Posted by kovidgoyal View Post
There is no default color coded in the editor, and adding one would be wrong, since it would conflict with the css defined in the book. Read what I said again. I did not ask you to check the background color, I asked you to check the foreground color. Obviously there is no background color, since the used background color comes from the theme colors. The question is why is there a foreground color.
What I meant is to have as default background color: WHITE.

It will not conflict with the writer's code/css as it will override the default. So if a user/writer adds
body {
background: red;
}

It will show a red background.

But you don't understand that the default background for all html pages is white. Not the windows theme color.
Entry20 is offline   Reply With Quote
Old 03-11-2018, 01:39 AM   #14
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: 43,773
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No, adding a background color would not get overridden by the book CSS, since the color would have to be added via CSS and whether it gets overridden or not depends on CSS specificity rules.

Not to mention that adding a background color to the editor is also wrong because it will give the false impression that the page has a background color when it really does not. The editor's preview panel is not a browser, it is meant to facilitate editing. And adding hidden CSS rules the suer does not know about and cannot change absolutely does not facilitate editing.
kovidgoyal is online now   Reply With Quote
Old 03-11-2018, 01:44 AM   #15
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: 43,773
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
And I dont know where you get the idea that backgrounds for all HTML pages are white. As per the actual HTML spec the background color defaults to transparent not white.

https://developer.mozilla.org/en-US/...ckground-color

See the initial value on that page.
kovidgoyal is online now   Reply With Quote
Reply

Tags
dark, problem, theme, windows

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Epub Preview in Windows File Explorer BetterRed ePub 5 10-11-2021 04:48 PM
Aura HD Windows 10 Developer Preview Problem ne0rmatrix Kobo Reader 1 07-03-2016 10:37 AM
Problem after (once) closing the File Preview Britomart Editor 6 05-02-2014 01:21 AM
Problem installing in Windows 7 - msi file only opens with extractor UrzaJR Calibre 7 02-27-2014 07:27 PM
Sigil with Dark OS Themes capidamonte Sigil 5 06-17-2012 12:32 AM


All times are GMT -4. The time now is 09:59 AM.


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