Add files via upload

This commit is contained in:
Nix 2024-04-25 11:30:33 -03:00 committed by GitHub
parent 61f5e3f8dd
commit d7d6b3de4a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -26,10 +26,10 @@ class IconLoader(QObject, threading.Thread):
pixmap.loadFromData(response.content)
self.icon_loaded.emit(pixmap.scaled(QSize(42, 42), Qt.KeepAspectRatio, Qt.SmoothTransformation))
else:
self.icon_loaded.emit(None)
self.icon_loaded.emit(QPixmap("missing.png"))
except Exception as e:
print("Error loading icon:", e)
self.icon_loaded.emit(None)
self.icon_loaded.emit(QPixmap("missing.png"))
class ModrinthSearchApp(QWidget):
def __init__(self):
@ -138,7 +138,7 @@ class ModrinthSearchApp(QWidget):
item.setData(Qt.DecorationRole, pixmap)
else:
# Set a default icon if loading failed
item.setIcon(QIcon("default_icon.png"))
item.setIcon(QIcon("missing.png"))
def show_mod_details_window(self):
selected_item = self.mods_list.currentItem()

BIN
missing.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B