mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-30 01:52:58 +02:00
Debug prints for failure to load styles
This commit is contained in:
parent
c6c878462e
commit
935049c1b3
1 changed files with 5 additions and 1 deletions
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
ORG_NAME = 'KovidsBrain'
|
||||
APP_UID = 'libprs500'
|
||||
from calibre import prints
|
||||
from calibre.constants import (islinux, iswindows, isbsd, isfrozen, isosx,
|
||||
plugins, config_dir, filesystem_encoding, DEBUG)
|
||||
from calibre.utils.config import Config, ConfigProxy, dynamic, JSONConfig
|
||||
|
|
@ -796,7 +797,8 @@ def load_calibre_style(self):
|
|||
|
||||
path = os.path.join(sys.extensions_location, 'calibre_style.'+(
|
||||
'pyd' if iswindows else 'so'))
|
||||
self.pi.load_style(path, 'Calibre')
|
||||
if not self.pi.load_style(path, 'Calibre'):
|
||||
prints('Failed to load calibre style')
|
||||
# On OSX, on some machines, colors can be invalid. See https://bugs.launchpad.net/bugs/1014900
|
||||
for role in (orig_pal.Button, orig_pal.Window):
|
||||
c = orig_pal.brush(role).color()
|
||||
|
|
@ -853,6 +855,8 @@ def setup_styles(self, force_calibre_style):
|
|||
except:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
if not depth_ok:
|
||||
prints('Color depth is less than 32 bits disabling modern look')
|
||||
|
||||
if force_calibre_style or (depth_ok and gprefs['ui_style'] !=
|
||||
'system'):
|
||||
|
|
|
|||
Loading…
Reference in a new issue