Add an env var to force calibre to use its native style plugin

This commit is contained in:
Kovid Goyal 2015-03-17 09:20:36 +05:30
parent 56b04a40d8
commit f7da0bc178
2 changed files with 3 additions and 1 deletions

View File

@ -30,6 +30,7 @@ Environment variables
* ``CALIBRE_OVERRIDE_LANG`` - Used to force the language used by the interface (ISO 639 language code) * ``CALIBRE_OVERRIDE_LANG`` - Used to force the language used by the interface (ISO 639 language code)
* ``CALIBRE_NO_NATIVE_FILEDIALOGS`` - Causes calibre to not use native file dialogs for selecting files/directories. Set it to 1 to enable. * ``CALIBRE_NO_NATIVE_FILEDIALOGS`` - Causes calibre to not use native file dialogs for selecting files/directories. Set it to 1 to enable.
* ``CALIBRE_NO_NATIVE_MENUBAR`` - Causes calibre to not create a native (global) menu on Ubuntu Unity and similar linux desktop environments. The menu is instead placed inside the window, as traditional. * ``CALIBRE_NO_NATIVE_MENUBAR`` - Causes calibre to not create a native (global) menu on Ubuntu Unity and similar linux desktop environments. The menu is instead placed inside the window, as traditional.
* ``CALIBRE_IGNORE_SYSTEM_THEME`` - Causes calibre to ignore any system Qt style plugins and use its builtin style plugin instead. Useful to workaround crashes caused by the system Qt plugin being incompatible with the version of Qt shipped with calibre.
* ``SYSFS_PATH`` - Use if sysfs is mounted somewhere other than /sys * ``SYSFS_PATH`` - Use if sysfs is mounted somewhere other than /sys
* ``http_proxy`` - Used on linux to specify an HTTP proxy * ``http_proxy`` - Used on linux to specify an HTTP proxy

View File

@ -990,7 +990,8 @@ class Application(QApplication):
if not depth_ok: if not depth_ok:
prints('Color depth is less than 32 bits disabling modern look') prints('Color depth is less than 32 bits disabling modern look')
self.using_calibre_style = force_calibre_style or (depth_ok and gprefs['ui_style'] != 'system') self.using_calibre_style = force_calibre_style or 'CALIBRE_IGNORE_SYSTEM_THEME' in os.environ or (
depth_ok and gprefs['ui_style'] != 'system')
if self.using_calibre_style: if self.using_calibre_style:
self.load_calibre_style() self.load_calibre_style()