File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,11 @@ def fill_apps_list(self, template=None):
140
140
qpixmap = icon .pixmap (QtCore .QSize (512 , 512 ))
141
141
qimage = QtGui .QImage (qpixmap )
142
142
qimage = tint_qimage (qimage , self .vm .label .color )
143
+ if (
144
+ qimage .size ().width () < 48
145
+ or qimage .size ().height () < 48
146
+ ):
147
+ qimage = qimage .scaled (48 , 48 )
143
148
qpixmap = QtGui .QPixmap (qimage )
144
149
icon = QtGui .QIcon (qpixmap )
145
150
else :
@@ -162,6 +167,13 @@ def fill_apps_list(self, template=None):
162
167
163
168
for app in whitelist :
164
169
item = AppListWidgetItem .from_ident (app )
170
+ if item .icon ().isNull ():
171
+ qpixmap = QtGui .QPixmap (48 , 48 )
172
+ color = QtGui .QColor (0 )
173
+ color .setAlpha (0 )
174
+ qpixmap .fill (color )
175
+ icon = QtGui .QIcon (qpixmap )
176
+ item .setIcon (icon )
165
177
self .app_list .selected_list .addItem (item )
166
178
167
179
self .app_list .available_list .sortItems ()
You can’t perform that action at this time.
0 commit comments