mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Allow CALIBRE_USE_DARK_PALETTE override registry setting on windows
This commit is contained in:
parent
0a1d4cfcbf
commit
d974b2f39c
@ -40,6 +40,8 @@ Environment variables
|
|||||||
the system theme -- beware of crashes and hangs.
|
the system theme -- beware of crashes and hangs.
|
||||||
* ``CALIBRE_SHOW_DEPRECATION_WARNINGS`` - Causes calibre to print deprecation warnings to stdout. Useful for calibre developers.
|
* ``CALIBRE_SHOW_DEPRECATION_WARNINGS`` - Causes calibre to print deprecation warnings to stdout. Useful for calibre developers.
|
||||||
* ``CALIBRE_NO_DEFAULT_PROGRAMS`` - Prevent calibre from automatically registering the filetypes it is capable of handling with Windows.
|
* ``CALIBRE_NO_DEFAULT_PROGRAMS`` - Prevent calibre from automatically registering the filetypes it is capable of handling with Windows.
|
||||||
|
* ``CALIBRE_USE_DARK_PALETTE`` - Set it to ``1`` to have calibre use dark colors and ``0`` for normal colors (ignored on macOS).
|
||||||
|
On Windows 10 in the absence of this variable, the windows system preference for dark colors is used.
|
||||||
* ``SYSFS_PATH`` - Use if sysfs is mounted somewhere other than /sys
|
* ``SYSFS_PATH`` - Use if sysfs is mounted somewhere other than /sys
|
||||||
* ``http_proxy``, ``https_proxy`` - Used on linux to specify an HTTP(S) proxy
|
* ``http_proxy``, ``https_proxy`` - Used on linux to specify an HTTP(S) proxy
|
||||||
|
|
||||||
@ -110,4 +112,3 @@ Customizing calibre with plugins
|
|||||||
calibre has a very modular design. Almost all functionality in calibre comes in the form of plugins. Plugins are used for conversion, for downloading news (though these are called recipes), for various components of the user interface, to connect to different devices, to process files when adding them to calibre and so on. You can get a complete list of all the built-in plugins in calibre by going to :guilabel:`Preferences->Advanced->Plugins`.
|
calibre has a very modular design. Almost all functionality in calibre comes in the form of plugins. Plugins are used for conversion, for downloading news (though these are called recipes), for various components of the user interface, to connect to different devices, to process files when adding them to calibre and so on. You can get a complete list of all the built-in plugins in calibre by going to :guilabel:`Preferences->Advanced->Plugins`.
|
||||||
|
|
||||||
You can write your own plugins to customize and extend the behavior of calibre. The plugin architecture in calibre is very simple, see the tutorial :ref:`pluginstutorial`.
|
You can write your own plugins to customize and extend the behavior of calibre. The plugin architecture in calibre is very simple, see the tutorial :ref:`pluginstutorial`.
|
||||||
|
|
||||||
|
@ -1021,10 +1021,12 @@ class Application(QApplication):
|
|||||||
using_calibre_style = True
|
using_calibre_style = True
|
||||||
if using_calibre_style:
|
if using_calibre_style:
|
||||||
use_dark_palette = False
|
use_dark_palette = False
|
||||||
if iswindows:
|
if 'CALIBRE_USE_DARK_PALETTE' in os.environ:
|
||||||
use_dark_palette = windows_is_system_dark_mode_enabled()
|
if not isosx:
|
||||||
elif not isosx:
|
use_dark_palette = os.environ['CALIBRE_USE_DARK_PALETTE'] != '0'
|
||||||
use_dark_palette = os.environ.get('CALIBRE_USE_DARK_PALETTE') == '1'
|
else:
|
||||||
|
if iswindows:
|
||||||
|
use_dark_palette = windows_is_system_dark_mode_enabled()
|
||||||
if use_dark_palette:
|
if use_dark_palette:
|
||||||
self.set_dark_mode_palette()
|
self.set_dark_mode_palette()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user