mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Fix high DPI rendering of yes/no icons in the book list
This commit is contained in:
parent
bc6e4b8813
commit
e7a8940f28
@ -204,9 +204,9 @@ class BooksModel(QAbstractTableModel): # {{{
|
|||||||
self.buffer_size = buffer
|
self.buffer_size = buffer
|
||||||
self.metadata_backup = None
|
self.metadata_backup = None
|
||||||
icon_height = (parent.fontMetrics() if hasattr(parent, 'fontMetrics') else QApplication.instance().fontMetrics()).lineSpacing()
|
icon_height = (parent.fontMetrics() if hasattr(parent, 'fontMetrics') else QApplication.instance().fontMetrics()).lineSpacing()
|
||||||
self.bool_yes_icon = QPixmap(I('ok.png')).scaledToHeight(icon_height, Qt.SmoothTransformation)
|
self.bool_yes_icon = QIcon(I('ok.png')).pixmap(icon_height)
|
||||||
self.bool_no_icon = QPixmap(I('list_remove.png')).scaledToHeight(icon_height, Qt.SmoothTransformation)
|
self.bool_no_icon = QIcon(I('list_remove.png')).pixmap(icon_height)
|
||||||
self.bool_blank_icon = QPixmap(I('blank.png')).scaledToHeight(icon_height, Qt.SmoothTransformation)
|
self.bool_blank_icon = QIcon(I('blank.png')).pixmap(icon_height)
|
||||||
# Qt auto-scales marked icon correctly, so we dont need to do it (and
|
# Qt auto-scales marked icon correctly, so we dont need to do it (and
|
||||||
# remember that the cover grid view needs a larger version of the icon,
|
# remember that the cover grid view needs a larger version of the icon,
|
||||||
# anyway)
|
# anyway)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user