File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,8 @@ def fill_apps_list(self, template=None):
139139 icon = QtGui .QIcon (icon_path )
140140 qpixmap = icon .pixmap (QtCore .QSize (512 , 512 ))
141141 qimage = QtGui .QImage (qpixmap )
142+ if qimage .size ().width () < 48 or qimage .size ().height () < 48 :
143+ qimage = qimage .scaled (48 , 48 )
142144 qimage = tint_qimage (qimage , self .vm .label .color )
143145 qpixmap = QtGui .QPixmap (qimage )
144146 icon = QtGui .QIcon (qpixmap )
@@ -162,6 +164,13 @@ def fill_apps_list(self, template=None):
162164
163165 for app in whitelist :
164166 item = AppListWidgetItem .from_ident (app )
167+ if item .icon ().isNull ():
168+ qpixmap = QtGui .QPixmap (48 , 48 )
169+ c = QtGui .QColor (0 )
170+ c .setAlpha (0 )
171+ qpixmap .fill (c )
172+ icon = QtGui .QIcon (qpixmap )
173+ item .setIcon (icon )
165174 self .app_list .selected_list .addItem (item )
166175
167176 self .app_list .available_list .sortItems ()
You can’t perform that action at this time.
0 commit comments