fix: restore else block in ClickableLabel paintEvent to render text without icon
All checks were successful
Code and build check / Check code (push) Successful in 1m22s
Code and build check / Build with uv (push) Successful in 46s

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 <boria138@altlinux.org>
This commit is contained in:
2025-06-15 00:52:18 +05:00
parent c54c3273a0
commit f765b5e840

View File

@ -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,