fix: restore else block in ClickableLabel paintEvent to render text without icon
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:
@ -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,
|
||||
|
Reference in New Issue
Block a user