Skip to content

Commit

Permalink
修复玩家不足 11 局游戏时对局信息界面游戏记录 tab 被拉伸 (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzaphkiel committed Nov 2, 2023
1 parent 4666e12 commit 96256b8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/view/game_info_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ def updateSummoners(self, summoners):

for summoner in summoners:
summonerView = SummonerInfoView(summoner)
self.items[summoner["summonerId"]] = summonerView # 用 summonerId 避免空字符串
# 用 summonerId 避免空字符串
self.items[summoner["summonerId"]] = summonerView
self.vBoxLayout.addWidget(summonerView, stretch=1)

if len(summoners) < 5:
Expand Down Expand Up @@ -495,16 +496,16 @@ def __init__(self, summoner, parent=None):
tab = GameTab(game)
self.vBoxLayout.addWidget(tab)

# if len(games) < 11:
# self.vBoxLayout.addSpacerItem(QSpacerItem(
# 1, 1, QSizePolicy.Expanding, QSizePolicy.Minimum))
if len(games) < 11:
self.vBoxLayout.addSpacerItem(QSpacerItem(
1, 1, QSizePolicy.Minimum, QSizePolicy.Expanding))


class GameTab(QFrame):

def __init__(self, game=None, parent=None):
super().__init__(parent)
# self.setFixedHeight(54)
self.setMinimumHeight(54)
# self.setFixedWidth(129)

self.hBoxLayout = QHBoxLayout(self)
Expand Down

0 comments on commit 96256b8

Please sign in to comment.