From fc09a577419f5469d5a83db3a062d9f8c6dbc571 Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Sat, 21 Sep 2013 19:33:32 +0200 Subject: [PATCH] Ensure that icons being composed are scaled to a 128x128 box. This handles both down- and up-scaling. --- src/calibre/gui2/library/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/gui2/library/models.py b/src/calibre/gui2/library/models.py index 182fd6866d..1345ae24cd 100644 --- a/src/calibre/gui2/library/models.py +++ b/src/calibre/gui2/library/models.py @@ -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: