From 2377426b27c3ba39a6210f3e45f830a672ee2a0f Mon Sep 17 00:00:00 2001 From: Boris Yumankulov Date: Sat, 7 Jun 2025 21:31:07 +0500 Subject: [PATCH] fix: correct badge positioning in GameCard on display filter change (again) Signed-off-by: Boris Yumankulov --- portprotonqt/game_card.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/portprotonqt/game_card.py b/portprotonqt/game_card.py index 64e7468..e9699a7 100644 --- a/portprotonqt/game_card.py +++ b/portprotonqt/game_card.py @@ -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