mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-28 16:56:08 +01:00
icon_map needs ints
This commit is contained in:
parent
ecba1203ab
commit
7f9d01e12c
1 changed files with 4 additions and 7 deletions
|
|
@ -1169,17 +1169,14 @@ def load_calibre_style(self):
|
|||
# if not os.path.exists(p): raise ValueError(p)
|
||||
pcache[v] = p
|
||||
v = pcache[v]
|
||||
icon_map[getattr(QStyle.StandardPixmap, 'SP_'+k)] = v
|
||||
icon_map[getattr(QStyle.StandardPixmap, 'SP_'+k).value] = v
|
||||
transient_scroller = 0
|
||||
if ismacos:
|
||||
from calibre_extensions.cocoa import transient_scroller
|
||||
transient_scroller = transient_scroller()
|
||||
icon_map[(QStyle.StandardPixmap.SP_CustomBase & 0xf0000000) + 1] = I('close-for-light-theme.png')
|
||||
icon_map[(QStyle.StandardPixmap.SP_CustomBase & 0xf0000000) + 2] = I('close-for-dark-theme.png')
|
||||
try:
|
||||
self.pi.load_style(icon_map, transient_scroller)
|
||||
except OverflowError: # running from source without updated runtime
|
||||
self.pi.load_style({}, transient_scroller)
|
||||
icon_map[(QStyle.StandardPixmap.SP_CustomBase.value & 0xf0000000) + 1] = I('close-for-light-theme.png')
|
||||
icon_map[(QStyle.StandardPixmap.SP_CustomBase.value & 0xf0000000) + 2] = I('close-for-dark-theme.png')
|
||||
self.pi.load_style(icon_map, transient_scroller)
|
||||
|
||||
def _send_file_open_events(self):
|
||||
with self._file_open_lock:
|
||||
|
|
|
|||
Loading…
Reference in a new issue