From f765b5e840654d16575f298a991ca3e16601756e Mon Sep 17 00:00:00 2001 From: Boris Yumankulov Date: Sun, 15 Jun 2025 00:52:18 +0500 Subject: [PATCH] fix: restore else block in ClickableLabel paintEvent to render text without icon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Restore the `else` block in `paintEvent` of `ClickableLabel` to set `text_rect` when no icon is present. This fixes a regression where `favoriteLabel` in `GameCard` was invisible but clickable, as text (`★` or `☆`) was not rendered without a pixmap. Signed-off-by: Boris Yumankulov --- portprotonqt/custom_widgets.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/portprotonqt/custom_widgets.py b/portprotonqt/custom_widgets.py index 52cf608..3e49196 100644 --- a/portprotonqt/custom_widgets.py +++ b/portprotonqt/custom_widgets.py @@ -221,6 +221,9 @@ class ClickableLabel(QLabel): icon_rect.moveLeft(x) text_rect = QRect(x + icon_size + spacing, y, text_width, text_height) painter.drawPixmap(icon_rect, pixmap) + else: + # Устанавливаем text_rect для меток без иконки (например, favoriteLabel) + text_rect = QRect(x, y, text_width, text_height) self.style().drawItemText( painter,