From 9048e4790ea839c29f4b10cc07ac7ac386267441 Mon Sep 17 00:00:00 2001 From: Dummerle Date: Wed, 25 Aug 2021 20:41:10 +0200 Subject: [PATCH] Fix some issues --- rare/components/tabs/shop/game_info.py | 9 ++++----- rare/components/tabs/shop/shop_widget.py | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/rare/components/tabs/shop/game_info.py b/rare/components/tabs/shop/game_info.py index e2309e85..1e3b2156 100644 --- a/rare/components/tabs/shop/game_info.py +++ b/rare/components/tabs/shop/game_info.py @@ -89,11 +89,11 @@ class ShopGameInfo(QWidget, Ui_shop_info): self.game = ShopGame.from_json(game, self.data) self.title.setText(self.game.title) self.price.setFont(QFont()) - if self.game.price != "0": - self.price.setText(self.game.price) - else: + print(type(self.game.price)) + if self.game.price == "0" or self.game.price == 0: self.price.setText(self.tr("Free")) - + else: + self.price.setText(self.game.price) if self.game.price != self.game.discount_price: font = QFont() font.setStrikeOut(True) @@ -136,7 +136,6 @@ class ShopGameInfo(QWidget, Ui_shop_info): except KeyError: pass self.tags.setText(", ".join(self.game.tags)) - self.price.setText(self.game.price) def add_wishlist_items(self, wishlist): wishlist = wishlist["data"]["Wishlist"]["wishlistItems"]["elements"] diff --git a/rare/components/tabs/shop/shop_widget.py b/rare/components/tabs/shop/shop_widget.py index 581da796..d5ca713a 100644 --- a/rare/components/tabs/shop/shop_widget.py +++ b/rare/components/tabs/shop/shop_widget.py @@ -44,7 +44,7 @@ class ShopWidget(QScrollArea, Ui_ShopWidget): self.free_widget.layout().addWidget(self.free_games_now) self.coming_free_games = QGroupBox(self.tr("Free Games next week")) self.coming_free_games.setLayout(QHBoxLayout()) - self.free_game_group_box.layout().addWidget(self.coming_free_games) + self.free_widget.layout().addWidget(self.coming_free_games) self.free_stack.addWidget(WaitingSpinner()) self.free_stack.setCurrentIndex(1)