mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
A couple more places that needed non-integer dpr support
This commit is contained in:
parent
6e158af47c
commit
fc43a34b68
@ -108,7 +108,10 @@ class ImageDelegate(QStyledItemDelegate):
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
dpr = painter.device().devicePixelRatio()
|
||||
try:
|
||||
dpr = painter.device().devicePixelRatioF()
|
||||
except AttributeError:
|
||||
dpr = painter.device().devicePixelRatio()
|
||||
cover.loadFromData(raw)
|
||||
cover.setDevicePixelRatio(dpr)
|
||||
if not cover.isNull():
|
||||
|
@ -373,7 +373,11 @@ class ImagesDelegate(QStyledItemDelegate):
|
||||
k = (th, entry.name)
|
||||
pmap = self.cache.get(k)
|
||||
if pmap is None:
|
||||
pmap = self.cache[k] = self.pixmap(th, entry, painter.device().devicePixelRatio())
|
||||
try:
|
||||
dpr = painter.device().devicePixelRatioF()
|
||||
except AttributeError:
|
||||
dpr = painter.device().devicePixelRatio()
|
||||
pmap = self.cache[k] = self.pixmap(th, entry, dpr)
|
||||
if pmap.isNull():
|
||||
bottom = option.rect.top()
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user