mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-04 10:23:41 +02:00
Allow advanced emblem rules to return multiple icon names using the same syntax as icon rules.
This commit is contained in:
parent
4c928a6c30
commit
5d0289606d
1 changed files with 4 additions and 3 deletions
|
|
@ -533,9 +533,10 @@ def paint(self, painter, option, index):
|
|||
for i, (kind, column, rule) in enumerate(emblem_rules):
|
||||
icon_name, mi = self.render_emblem(book_id, rule, i, m.cover_grid_emblem_cache, mi, db, m.formatter, m.cover_grid_template_cache)
|
||||
if icon_name is not None:
|
||||
pixmap = self.cached_emblem(m.cover_grid_bitmap_cache, icon_name)
|
||||
if pixmap is not None:
|
||||
emblems.append(pixmap)
|
||||
for one_icon in [i.strip() for i in icon_name.split(':') if i.strip()]:
|
||||
pixmap = self.cached_emblem(m.cover_grid_bitmap_cache, one_icon)
|
||||
if pixmap is not None:
|
||||
emblems.append(pixmap)
|
||||
if marked:
|
||||
emblems.insert(0, self.cached_emblem(m.cover_grid_bitmap_cache, ':marked', m.marked_icon))
|
||||
if on_device:
|
||||
|
|
|
|||
Loading…
Reference in a new issue