mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-02-04 01:53:32 -05:00
Use cached icons for emblems
This commit is contained in:
parent
3abe64dd56
commit
f2bed5f206
@ -1852,7 +1852,7 @@ class BookshelfView(MomentumScrollMixin, QAbstractScrollArea):
|
||||
on_device = device_connected and db.field_for('ondevice', book_id)
|
||||
if on_device:
|
||||
if getattr(self, 'on_device_icon', None) is None:
|
||||
self.on_device_icon = QIcon.ic('ok.png')
|
||||
self.on_device_icon = QIcon.cached_icon('ok.png')
|
||||
which = above if below else below
|
||||
which.append(self.on_device_icon)
|
||||
custom = self.render_emblem(book_id)
|
||||
@ -1868,7 +1868,7 @@ class BookshelfView(MomentumScrollMixin, QAbstractScrollArea):
|
||||
which = bottom
|
||||
case _:
|
||||
which = above if below and not above else below
|
||||
which.append(QIcon.ic(custom))
|
||||
which.append(QIcon.cached_icon(custom))
|
||||
|
||||
def draw_horizontal(emblems: list[QIcon], position: str) -> None:
|
||||
if not emblems:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user