diff --git a/src/calibre/gui2/icon_theme.py b/src/calibre/gui2/icon_theme.py index aa7924bd89..1f40c93e14 100644 --- a/src/calibre/gui2/icon_theme.py +++ b/src/calibre/gui2/icon_theme.py @@ -497,7 +497,7 @@ class Delegate(QStyledItemDelegate): pixmap = index.data(Qt.DecorationRole) if pixmap and not pixmap.isNull(): rect = option.rect.adjusted(0, self.SPACING, COVER_SIZE[0] - option.rect.width(), - self.SPACING) - painter.drawPixmap(rect, pixmap, pixmap.rect()) + painter.drawPixmap(rect, pixmap) if option.state & QStyle.State_Selected: painter.setPen(QPen(QApplication.instance().palette().highlightedText().color())) bottom = option.rect.bottom() - 2 @@ -690,6 +690,7 @@ class ChooseTheme(Dialog): theme['cover-pixmap'] = p = QPixmap() if isinstance(cdata, bytes): p.loadFromData(cdata) + p.setDevicePixelRatio(self.devicePixelRatio()) item = self.item_from_name(theme['name']) if item is not None: item.setData(Qt.DecorationRole, p) diff --git a/src/calibre/gui2/preferences/look_feel.py b/src/calibre/gui2/preferences/look_feel.py index 378b5993b2..b95b02c57e 100644 --- a/src/calibre/gui2/preferences/look_feel.py +++ b/src/calibre/gui2/preferences/look_feel.py @@ -239,7 +239,9 @@ class Background(QWidget): # {{{ from calibre.gui2.preferences.texture_chooser import texture_path path = texture_path(self.btex) if path: - self.brush.setTexture(QPixmap(path)) + p = QPixmap(path) + p.setDevicePixelRatio(self.devicePixelRatio()) + self.brush.setTexture(p) self.update() def sizeHint(self):