mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-02-15 07:52:16 -05:00
...
This commit is contained in:
parent
2e0ceacba7
commit
aa6b2c9d0a
@ -747,9 +747,8 @@ class CoverDelegate(QStyledItemDelegate):
|
||||
cover = QPixmap(cover)
|
||||
cover.setDevicePixelRatio(painter.device().devicePixelRatioF())
|
||||
sz = cover.deviceIndependentSize()
|
||||
cw, ch = sz.width(), sz.height()
|
||||
dx = max(0, int((rect.width() - cw)/2.0))
|
||||
dy = max(0, int((rect.height() - ch)/2.0))
|
||||
dx = max(0, int((rect.width() - sz.width())/2.0))
|
||||
dy = max(0, int((rect.height() - sz.height())/2.0))
|
||||
right_adjust = dx
|
||||
rect.adjust(dx, dy, -dx, -dy)
|
||||
self.paint_cover(painter, rect, cover)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user