1
0
Fork 0
mirror of synced 2024-06-24 01:00:43 +12:00

Fix some issues

This commit is contained in:
Dummerle 2021-08-25 20:41:10 +02:00
parent cc54474e75
commit 9048e4790e
2 changed files with 5 additions and 6 deletions

View file

@ -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"]

View file

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