From 34d6d13cb2cc5216ced652b1d192fb253a8f89e8 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Tue, 3 Dec 2019 20:01:25 +0300 Subject: [PATCH] Avoid extra indentation in non-spool version of the tooltip --- gui/builtinStatsViews/firepowerViewFull.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gui/builtinStatsViews/firepowerViewFull.py b/gui/builtinStatsViews/firepowerViewFull.py index ce4ea25ab..46eaa4620 100644 --- a/gui/builtinStatsViews/firepowerViewFull.py +++ b/gui/builtinStatsViews/firepowerViewFull.py @@ -159,19 +159,23 @@ class FirepowerViewFull(StatsView): def dpsToolTip(normal, preSpool, fullSpool, prec, lowest, highest): if normal is None or preSpool is None or fullSpool is None: return "" + hasSpool = hasSpoolUp(preSpool, fullSpool) lines = [] - if hasSpoolUp(preSpool, fullSpool): + if hasSpool: lines.append("Spool up: {}-{}".format( formatAmount(preSpool.total, prec, lowest, highest), formatAmount(fullSpool.total, prec, lowest, highest))) if getattr(normal, 'total', None): - if lines: + if hasSpool: lines.append("") lines.append("Current: {}".format(formatAmount(normal.total, prec, lowest, highest))) for dmgType in normal.names(): val = getattr(normal, dmgType, None) if val: - lines.append(" {}: {}%".format(dmgType.capitalize(), formatAmount(val / normal.total * 100, 3, 0, 0))) + lines.append("{}{}: {}%".format( + " " if hasSpool else "", + dmgType.capitalize(), + formatAmount(val / normal.total * 100, 3, 0, 0))) return "\n".join(lines) defaultSpoolValue = eos.config.settings['globalDefaultSpoolupPercentage']