diff --git a/portprotonqt/game_card.py b/portprotonqt/game_card.py index 0ef20c1..eef003f 100644 --- a/portprotonqt/game_card.py +++ b/portprotonqt/game_card.py @@ -1,6 +1,7 @@ from PySide6.QtGui import QPainter, QColor, QDesktopServices from PySide6.QtCore import Signal, Property, Qt, QUrl from PySide6.QtWidgets import QFrame, QGraphicsDropShadowEffect, QVBoxLayout, QWidget, QStackedLayout, QLabel +from collections.abc import Callable from portprotonqt.image_utils import load_pixmap_async, round_corners from portprotonqt.localization import _ from portprotonqt.config_utils import read_favorites, save_favorites, read_display_filter, read_theme_from_config @@ -9,6 +10,8 @@ from portprotonqt.custom_widgets import ClickableLabel from portprotonqt.portproton_api import PortProtonAPI from portprotonqt.downloader import Downloader from portprotonqt.animations import GameCardAnimations +from typing import cast + class GameCard(QFrame): borderWidthChanged = Signal() @@ -441,9 +444,10 @@ class GameCard(QFrame): self.update_scale() self.scaleChanged.emit() - borderWidth = Property(int, getBorderWidth, setBorderWidth, notify=borderWidthChanged) - gradientAngle = Property(float, getGradientAngle, setGradientAngle, notify=gradientAngleChanged) - scale = Property(float, getScale, setScale, notify=scaleChanged) + borderWidth = Property(int, getBorderWidth, setBorderWidth, None, "", notify=cast(Callable[[], None], borderWidthChanged)) + gradientAngle = Property(float, getGradientAngle, setGradientAngle, None, "", notify=cast(Callable[[], None], gradientAngleChanged)) + scale = Property(float, getScale, setScale, None, "", notify=cast(Callable[[], None], scaleChanged)) + def paintEvent(self, event): super().paintEvent(event)