mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:14:02 +02:00
Fix high DPI rendering of covers in book details panel
This commit is contained in:
parent
924f426310
commit
c875d408a7
1 changed files with 4 additions and 2 deletions
|
|
@ -289,8 +289,10 @@ def paintEvent(self, event):
|
|||
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…
Reference in a new issue