Skip to content

Commit

Permalink
让最近队友组件中的队友栏靠上排列
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzaphkiel committed Jun 22, 2024
1 parent 7261935 commit 1fb07c7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/view/career_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,14 @@ def clear(self):
def updateSummoners(self, info):
for summoner in info['summoners']:
infoBar = TeammateInfoBar(summoner)
self.infopageVBoxLayout.addWidget(infoBar)
self.infopageVBoxLayout.addWidget(infoBar, stretch=1)

length = len(info['summoners'])
spacing = self.infopageVBoxLayout.spacing()

if length < 5:
self.infopageVBoxLayout.addStretch(5-length)
self.infopageVBoxLayout.addSpacing(spacing * (5-length))

def setLoadingPageEnabled(self, enable):
index = 0 if enable else 1
Expand Down

0 comments on commit 1fb07c7

Please sign in to comment.