mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix high DPI rendering of covers in book details panel
This commit is contained in:
parent
924f426310
commit
c875d408a7
@ -289,8 +289,10 @@ class CoverView(QWidget): # {{{
|
||||
target = QRect(x, y, width, height)
|
||||
p = QPainter(self)
|
||||
p.setRenderHints(QPainter.Antialiasing | QPainter.SmoothPixmapTransform)
|
||||
p.drawPixmap(target, self.pixmap.scaled(target.size(),
|
||||
Qt.KeepAspectRatio, Qt.SmoothTransformation))
|
||||
dpr = self.devicePixelRatio()
|
||||
spmap = self.pixmap.scaled(target.size() * dpr, Qt.KeepAspectRatio, Qt.SmoothTransformation)
|
||||
spmap.setDevicePixelRatio(dpr)
|
||||
p.drawPixmap(target, spmap)
|
||||
if gprefs['bd_overlay_cover_size']:
|
||||
sztgt = target.adjusted(0, 0, 0, -4)
|
||||
f = p.font()
|
||||
|
Loading…
x
Reference in New Issue
Block a user