Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions qubesmanager/appmenu_select.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@
qpixmap = icon.pixmap(QtCore.QSize(512, 512))
qimage = QtGui.QImage(qpixmap)
qimage = tint_qimage(qimage, self.vm.label.color)
if (

Check warning on line 143 in qubesmanager/appmenu_select.py

View check run for this annotation

Codecov / codecov/patch

qubesmanager/appmenu_select.py#L143

Added line #L143 was not covered by tests
qimage.size().width() < 48
or qimage.size().height() < 48
):
qimage = qimage.scaled(48, 48)

Check warning on line 147 in qubesmanager/appmenu_select.py

View check run for this annotation

Codecov / codecov/patch

qubesmanager/appmenu_select.py#L147

Added line #L147 was not covered by tests
qpixmap = QtGui.QPixmap(qimage)
icon = QtGui.QIcon(qpixmap)
else:
Expand All @@ -162,6 +167,13 @@

for app in whitelist:
item = AppListWidgetItem.from_ident(app)
if item.icon().isNull():
qpixmap = QtGui.QPixmap(48, 48)
color = QtGui.QColor(0)
color.setAlpha(0)
qpixmap.fill(color)
icon = QtGui.QIcon(qpixmap)
item.setIcon(icon)
self.app_list.selected_list.addItem(item)

self.app_list.available_list.sortItems()
Expand Down