mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit Book: Fix icons in File Browser blurry on High DPI screens
This commit is contained in:
parent
a2e4d12381
commit
6be52464ae
@ -196,7 +196,7 @@ class FileList(QTreeWidget):
|
|||||||
self.emblem_cache = {}
|
self.emblem_cache = {}
|
||||||
self.rendered_emblem_cache = {}
|
self.rendered_emblem_cache = {}
|
||||||
self.top_level_pixmap_cache = {
|
self.top_level_pixmap_cache = {
|
||||||
name : QPixmap(I(icon)).scaled(TOP_ICON_SIZE, TOP_ICON_SIZE, transformMode=Qt.SmoothTransformation)
|
name : QIcon(I(icon)).pixmap(TOP_ICON_SIZE, TOP_ICON_SIZE)
|
||||||
for name, icon in {
|
for name, icon in {
|
||||||
'text':'keyboard-prefs.png',
|
'text':'keyboard-prefs.png',
|
||||||
'styles':'lookfeel.png',
|
'styles':'lookfeel.png',
|
||||||
@ -336,8 +336,7 @@ class FileList(QTreeWidget):
|
|||||||
for emblem in emblems:
|
for emblem in emblems:
|
||||||
pm = self.emblem_cache.get(emblem, None)
|
pm = self.emblem_cache.get(emblem, None)
|
||||||
if pm is None:
|
if pm is None:
|
||||||
pm = self.emblem_cache[emblem] = QPixmap(
|
pm = self.emblem_cache[emblem] = QIcon(I(emblem)).pixmap(self.iconSize())
|
||||||
I(emblem)).scaled(self.iconSize(), transformMode=Qt.SmoothTransformation)
|
|
||||||
pixmaps.append(pm)
|
pixmaps.append(pm)
|
||||||
num = len(pixmaps)
|
num = len(pixmaps)
|
||||||
w, h = pixmaps[0].width(), pixmaps[0].height()
|
w, h = pixmaps[0].width(), pixmaps[0].height()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user