Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-07-2019, 11:17 PM   #31
pghaworth
Fervent Pleasure Seeker
pghaworth ought to be getting tired of karma fortunes by now.pghaworth ought to be getting tired of karma fortunes by now.pghaworth ought to be getting tired of karma fortunes by now.pghaworth ought to be getting tired of karma fortunes by now.pghaworth ought to be getting tired of karma fortunes by now.pghaworth ought to be getting tired of karma fortunes by now.pghaworth ought to be getting tired of karma fortunes by now.pghaworth ought to be getting tired of karma fortunes by now.pghaworth ought to be getting tired of karma fortunes by now.pghaworth ought to be getting tired of karma fortunes by now.pghaworth ought to be getting tired of karma fortunes by now.
 
pghaworth's Avatar
 
Posts: 1,224
Karma: 712073
Join Date: Feb 2009
Location: The Windmills of My Mind
Device: Clara HD
Quote:
Originally Posted by thiago.eec View Post
We can all thank @Kovid.
we can, and I have. profusely.

I think I have to wait for the release because that info link you gave me is like reading Japanese for me... I don't. *shrug*
pghaworth is offline   Reply With Quote
Old 12-08-2019, 08:22 AM   #32
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
@Kovid,

Thanks very much for Windows nightmode.

I spent a few hours with it yesterday without too many problems, but I did notice a few things for possible further consideration before initial release.
  1. Editor TOC panel. The expand/collapse chars for nested entries are no longer visible (see screencap) unless the mouse is hovering over them. The TOC Editor does not have the same issue.
  2. Separator lines in a sub-menu are no longer visible (QMenu.addSeparator()).
  3. If anyone has a plugin which uses QPushButton.setDown() to show whether an option is on/off then it is no longer easy to see a visible difference between True/False settings. I was able to find a workaround for my own plugin which previously used .setDown().
  4. This is probably stating the obvious but quite a lot of the standard Editor icons are not currently suited to nightmode, e.g. Smart Comment, Insert tag and most of the Text formatting ones (bold, italic, subscript, align-left, etc)

I attach a screencap showing issues 1 and 4.
  • TOC Parts One, Two and Three should all be displaying a visible '>' expand char.
  • I've placed quick & dirty customised icons for Bold/Italic/Heading in my config resources/images directory but the Subscript/Superscript icons on the far right are typical of what the average user is going to see for text formatting options.
Attached Thumbnails
Click image for larger version

Name:	editor_nightmode.JPG
Views:	189
Size:	36.5 KB
ID:	175447  
jackie_w is offline   Reply With Quote
Advert
Old 12-08-2019, 11:44 AM   #33
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: 45,365
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@jackie_w: Adapting the icons for dark mode is a long tem project, I suggest switching to one of the other icon themes that works better with dark mode.

As for the other issues, they are basically problems with the Qt fusion style, which may or may not be fixable, one will have to experiment.
kovidgoyal is offline   Reply With Quote
Old 12-08-2019, 12:34 PM   #34
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by kovidgoyal View Post
As for the other issues, they are basically problems with the Qt fusion style, which may or may not be fixable, one will have to experiment.
I do hope 'one' means you not me

Quote:
Originally Posted by kovidgoyal View Post
@jackie_w: Adapting the icons for dark mode is a long tem project, I suggest switching to one of the other icon themes that works better with dark mode.
For the few that matter to me I'll be OK with personal customised icons in config/resources/images. By far the biggest culprits icon-wise are the ones from my own personal calibre plugins. A long session with Photoshop awaits (sigh).

Speaking of custom icons ... I can't remember whether it is possible to customise calibre plugin icons in the config/resources/images directory in the same way you can for main calibre icons. I have a vague memory of kiwidude discussing it many years ago but I don't recall whether it was a special feature unique to his own plugins.

Does anyone else remember?
jackie_w is offline   Reply With Quote
Old 12-08-2019, 12:56 PM   #35
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: 45,365
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Load the icons in your plugins as

I('plugin_name/image.png')

and they will automatically come from the configresources directory if present.
kovidgoyal is offline   Reply With Quote
Advert
Old 12-08-2019, 01:34 PM   #36
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,216
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
Hi, @Kovid.

About this commit: https://github.com/kovidgoyal/calibr...9e118a40fa7a90

Can I import this from a plugin to detect if Dark Mode is set? Maybe like this:
Code:
from calibre.gui2 import is_dark_theme
Is this a boolean? This would be useful to adapt the icons automatically.

EDIT: Oops... already answered below as I was editing it.

Last edited by thiago.eec; 12-08-2019 at 01:43 PM.
thiago.eec is offline   Reply With Quote
Old 12-08-2019, 01:42 PM   #37
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: 45,365
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
In a plugin if you want to check if dark mode is currently active, you use

QApplication.instance().is_dark_theme
kovidgoyal is offline   Reply With Quote
Old 12-08-2019, 03:50 PM   #38
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by kovidgoyal View Post
Load the icons in your plugins as

I('plugin_name/image.png')

and they will automatically come from the configresources directory if present.
Please can you clarify the use of I('plugin_name/image.png') using this real-life example? I'm not clear where the 'I' goes related to 'get_icons'. Nor am I sure exactly what dir structure to use for the custom icons.


Note: Non-techies may want to skip this post ...

I have a plugin named 'TTS to MP3'. It's located as a .zip in config/plugins/TTS to MP3.zip.

Inside the .zip is:
  • a mandatory plugin .txt file (plugin-import-name-tts_to_mp3_plugin.txt)
  • plugin icons are now in their own subdirectory (TTS to MP3), but I've always used the name images in the past.

In the plugin genesis() I have:
Code:
self.icons = get_icons(['TTS to MP3/plugin_icon.png',
                        'TTS to MP3/play.png',
                        'TTS to MP3/stop.png'])
self.qaction.setIcon(get_icons('TTS to MP3/plugin_icon.png'))
and if I want to use an icon somewhere in the plugin GUI, something like
Code:
button.setIcon(get_icons('TTS to MP3/play.png'))
I've copied a customised icon to:
Code:
config/resources/images/TTS to MP3/plugin_icon.png
So what needs to change above? Where do I use the 'I' and is the custom icon config directory location correct?
jackie_w is offline   Reply With Quote
Old 12-08-2019, 09:36 PM   #39
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: 45,365
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use I() first and check if the path returned exists, if it does use it, otherwise use the image returned by get_icons().
kovidgoyal is offline   Reply With Quote
Old 12-09-2019, 01:59 PM   #40
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by kovidgoyal View Post
Use I() first and check if the path returned exists, if it does use it, otherwise use the image returned by get_icons().
Thanks.

It's taken a while but after some experimentation, I think I now understand this a bit better. I think I have some boilerplate code I can add to my User Interface plugins as necessary.
jackie_w is offline   Reply With Quote
Old 12-09-2019, 06:30 PM   #41
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by jackie_w View Post
Thanks.

It's taken a while but after some experimentation, I think I now understand this a bit better. I think I have some boilerplate code I can add to my User Interface plugins as necessary.
If you are using a common_utils.py from one of kiwidude's plugins, the "get_icons" method probably uses "I()". Or is a wrapper for "get_icon" which does.
davidfor is offline   Reply With Quote
Old 12-09-2019, 07:04 PM   #42
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,216
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
Hi, @Kovid.

About the change to make menu separators more visible (this commit).
I saw no difference here. It's just like before. Menu separators are not visible.
thiago.eec is offline   Reply With Quote
Old 12-09-2019, 10:04 PM   #43
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: 45,365
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by thiago.eec View Post
Hi, @Kovid.

About the change to make menu separators more visible (this commit).
I saw no difference here. It's just like before. Menu separators are not visible.
That has changes to native code you wont see them using CALIBRE_DEVELOP_FROM you have to wait for the next release.
kovidgoyal is offline   Reply With Quote
Old 12-10-2019, 03:12 AM   #44
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,216
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
Quote:
Originally Posted by kovidgoyal View Post
That has changes to native code you wont see them using CALIBRE_DEVELOP_FROM you have to wait for the next release.
Ok, then.
thiago.eec is offline   Reply With Quote
Old 12-10-2019, 05:05 PM   #45
Gorgoth
Junior Member
Gorgoth began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Dec 2019
Device: none
Quote:
Originally Posted by kovidgoyal View Post
There is no dark mode setting on windows 7 for calibre to use. On windows 7 simply set the system theme to use dark colors.
I know, I meant like a dark theme for Calibre. Using dark colours on Win 7 disables Aero which looks awful.
Gorgoth is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
night mode cybmole Kindle Fire 9 04-27-2015 01:43 AM
Glo Night mode ? Ethanaul Kobo Reader 1 07-23-2013 10:23 PM
Odyssey Anyone using Night-Mode? DuckieTigger Bookeen 2 01-28-2012 12:13 PM
help with night mode golfgirl Kobo Tablets 5 11-04-2011 10:40 AM
Is there a night mode? zeroh Nook Color & Nook Tablet 5 12-04-2010 10:24 AM


All times are GMT -4. The time now is 05:40 PM.


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