fix: correct badge positioning in GameCard on display filter change (again)

Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
Boris Yumankulov 2025-06-07 21:31:07 +05:00
parent a5977f0f59
commit 2377426b27
Signed by: Boria138
GPG Key ID: 14B4A5673FD39C76

View File

@ -266,13 +266,6 @@ class GameCard(QFrame):
self.egsLabel.setVisible(self.egs_visible)
self.portprotonLabel.setVisible(self.portproton_visible)
# Reposition badges
right_margin = 8
badge_spacing = 5
top_y = 10
badge_y_positions = []
badge_width = int(self.coverLabel.width() * 2/3)
badges = [
(self.steam_visible, self.steamLabel),
(self.egs_visible, self.egsLabel),
@ -281,6 +274,12 @@ class GameCard(QFrame):
(self.anticheatLabel.isVisible(), self.anticheatLabel),
]
right_margin = 8
badge_spacing = 5
top_y = 10
badge_y_positions = []
badge_width = int(self.coverLabel.width() * 2/3)
for is_visible, badge in badges:
if is_visible:
badge_x = self.coverLabel.width() - badge_width - right_margin