mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Ensure that icons being composed are scaled to a 128x128 box. This handles both down- and up-scaling.
This commit is contained in:
parent
4881e93d2d
commit
fc09a57741
@ -111,6 +111,8 @@ class ColumnIcon(object): # {{{
|
||||
d = os.path.join(config_dir, 'cc_icons', icon)
|
||||
if (os.path.exists(d)):
|
||||
bm = QPixmap(d)
|
||||
bm = bm.scaled(128, 128, aspectRatioMode= Qt.KeepAspectRatio,
|
||||
transformMode=Qt.SmoothTransformation)
|
||||
icon_bitmaps.append(bm)
|
||||
total_width += bm.width()
|
||||
if len(icon_bitmaps) > 1:
|
||||
|
Loading…
x
Reference in New Issue
Block a user