Skip to content

Commit

Permalink
fixed comment spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
Arne-Weber committed Jun 2, 2024
1 parent 251d0ce commit 7212bc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1057,15 +1057,15 @@ def get_title(self, drop: TimedDrop | None) -> str:
min_length = 30
diff = len(title) - 127
if (len(drop.rewards_text()) - diff) >= min_length + 1: # If we can trim the drop name to 20 chars
new_length = len(drop.rewards_text()) - diff - 1 # Length - Diff - Ellipse (…)
new_length = len(drop.rewards_text()) - diff - 1 # Length - Diff - Ellipsis (…)
title = (
f"{self.TITLE}\n"
f"{campaign.game.name}\n"
f"{drop.rewards_text()[:new_length]}… "
f"{drop.progress:.1%} ({campaign.claimed_drops}/{campaign.total_drops})"
)
else: # Trimming both
new_length = len(campaign.game.name) - (diff - len(drop.rewards_text()) + min_length + 1) - 1 # Campaign name - (Remaining diff from trimmed drop name) - Ellipse
new_length = len(campaign.game.name) - (diff - len(drop.rewards_text()) + min_length + 1) - 1 # Campaign name - (Remaining diff from trimmed drop name) - Ellipsis
title = (
f"{self.TITLE}\n"
f"{campaign.game.name[:new_length]}\n"
Expand Down

0 comments on commit 7212bc9

Please sign in to comment.