from logging import getLogger from PyQt5.QtCore import pyqtSignal from PyQt5.QtWidgets import QVBoxLayout, QLabel from rare.components.tabs.Games.GameWidgets.base_uninstalled_widget import BaseUninstalledWidget from rare.utils.models import InstallOptions from rare.utils.extra_widgets import ClickableLabel from custom_legendary.core import LegendaryCore from custom_legendary.models.game import Game logger = getLogger("Uninstalled") class IconWidgetUninstalled(BaseUninstalledWidget): install_game = pyqtSignal(InstallOptions) def __init__(self, game: Game, core: LegendaryCore, pixmap): super(IconWidgetUninstalled, self).__init__(game, core, pixmap) self.layout = QVBoxLayout() self.setObjectName("game_widget_icon") if self.pixmap: w = 200 self.pixmap = self.pixmap.scaled(w, int(w * 4 / 3)) self.image = ClickableLabel() self.image.setPixmap(self.pixmap) self.layout.addWidget(self.image) self.title_label = QLabel(f"