![]() |
#31 |
Fervent Pleasure Seeker
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,224
Karma: 712073
Join Date: Feb 2009
Location: The Windmills of My Mind
Device: Clara HD
|
|
![]() |
![]() |
![]() |
#32 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
I attach a screencap showing issues 1 and 4.
|
![]() |
![]() |
Advert | |
|
![]() |
#33 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#34 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Quote:
![]() Quote:
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? |
||
![]() |
![]() |
![]() |
#35 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
Advert | |
|
![]() |
#36 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 EDIT: Oops... already answered below as I was editing it. Last edited by thiago.eec; 12-08-2019 at 01:43 PM. |
![]() |
![]() |
![]() |
#37 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
![]() |
#38 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Quote:
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:
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')) Code:
button.setIcon(get_icons('TTS to MP3/play.png')) Code:
config/resources/images/TTS to MP3/plugin_icon.png |
|
![]() |
![]() |
![]() |
#39 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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().
|
![]() |
![]() |
![]() |
#40 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Quote:
![]() 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. |
|
![]() |
![]() |
![]() |
#41 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
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.
|
![]() |
![]() |
![]() |
#42 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#43 | |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,365
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
|
|
![]() |
![]() |
![]() |
#44 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,216
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
|
![]() |
![]() |
![]() |
#45 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Dec 2019
Device: none
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |