Ensure that icons being composed are scaled to a 128x128 box. This handles both down- and up-scaling.

This commit is contained in:
Charles Haley 2013-09-21 19:33:32 +02:00
parent 4881e93d2d
commit fc09a57741

View File

@ -111,6 +111,8 @@ class ColumnIcon(object): # {{{
d = os.path.join(config_dir, 'cc_icons', icon) d = os.path.join(config_dir, 'cc_icons', icon)
if (os.path.exists(d)): if (os.path.exists(d)):
bm = QPixmap(d) bm = QPixmap(d)
bm = bm.scaled(128, 128, aspectRatioMode= Qt.KeepAspectRatio,
transformMode=Qt.SmoothTransformation)
icon_bitmaps.append(bm) icon_bitmaps.append(bm)
total_width += bm.width() total_width += bm.width()
if len(icon_bitmaps) > 1: if len(icon_bitmaps) > 1: