diff --git a/portprotonqt/custom_widgets.py b/portprotonqt/custom_widgets.py index c8edb6b..2a362cc 100644 --- a/portprotonqt/custom_widgets.py +++ b/portprotonqt/custom_widgets.py @@ -133,7 +133,7 @@ class FlowLayout(QLayout): class ClickableLabel(QLabel): clicked = Signal() - def __init__(self, *args, icon=None, icon_size=16, icon_space=5, **kwargs): + def __init__(self, *args, icon=None, icon_size=16, icon_space=5, change_cursor=True, **kwargs): """ Поддерживаются вызовы: - ClickableLabel("текст", parent=...) – первый аргумент строка, @@ -143,6 +143,7 @@ class ClickableLabel(QLabel): icon: QIcon или None – иконка, которая будет отрисована вместе с текстом. icon_size: int – размер иконки (ширина и высота). icon_space: int – отступ между иконкой и текстом. + change_cursor: bool – изменять ли курсор на PointingHandCursor при наведении (по умолчанию True). """ if args and isinstance(args[0], str): text = args[0] @@ -161,7 +162,8 @@ class ClickableLabel(QLabel): self._icon = icon self._icon_size = icon_size self._icon_space = icon_space - self.setCursor(Qt.CursorShape.PointingHandCursor) + if change_cursor: + self.setCursor(Qt.CursorShape.PointingHandCursor) def setIcon(self, icon): """Устанавливает иконку и перерисовывает виджет.""" diff --git a/portprotonqt/game_card.py b/portprotonqt/game_card.py index b5062c1..93a371e 100644 --- a/portprotonqt/game_card.py +++ b/portprotonqt/game_card.py @@ -164,6 +164,7 @@ class GameCard(QFrame): parent=coverWidget, icon_size=16, icon_space=5, + change_cursor=False ) self.egsLabel.setStyleSheet(self.theme.STEAM_BADGE_STYLE) self.egsLabel.setFixedWidth(int(card_width * 2/3)) # Устанавливаем ширину в 2/3 ширины карточки diff --git a/portprotonqt/main_window.py b/portprotonqt/main_window.py index 0e9601c..63785d9 100644 --- a/portprotonqt/main_window.py +++ b/portprotonqt/main_window.py @@ -1440,6 +1440,7 @@ class MainWindow(QMainWindow): parent=coverFrame, icon_size=16, icon_space=5, + change_cursor=False ) egsLabel.setStyleSheet(self.theme.STEAM_BADGE_STYLE) egsLabel.setFixedWidth(badge_width)