Skip to content

Commit

Permalink
调整 OPGG build 界面符文展示组件横向间距
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzaphkiel committed Nov 15, 2024
1 parent f954bb4 commit 1fd739f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion app/lol/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,9 @@ async def autoComplete(data, selection: ChampionSelection):
if not isAutoCompleted or selection.isChampionPickedCompleted:
return

localPlayerCellId = data['localPlayerCellId']
if not (localPlayerCellId := data.get('localPlayerCellId', None)):
return

for actionGroup in reversed(data['actions']):
for action in actionGroup:
if action['actorCellId'] != localPlayerCellId:
Expand Down Expand Up @@ -1669,6 +1671,10 @@ async def autoBan(data, selection: ChampionSelection):

candidates.extend(cfg.get(cfg.autoBanChampion))

bans = itertools.chain(data["bans"]['myTeamBans'],
data["bans"]['theirTeamBans'])
candidates = [x for x in candidates if x not in bans]

# 给队友一点预选的时间
await asyncio.sleep(cfg.get(cfg.autoBanDelay))

Expand Down
2 changes: 1 addition & 1 deletion app/view/opgg_build_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ def __initLayout(self):
self.shardsPerksLayout.addLayout(layout)

self.gridLayout.setAlignment(Qt.AlignCenter)
self.gridLayout.setHorizontalSpacing(20)
self.gridLayout.setHorizontalSpacing(18)
self.gridLayout.setContentsMargins(0, 0, 4, 4)
self.gridLayout.addWidget(
self.mainTitleIcon, 0, 0, alignment=Qt.AlignCenter)
Expand Down

0 comments on commit 1fd739f

Please sign in to comment.