diff --git a/qt_ui/windows/finances/QFinancesMenu.py b/qt_ui/windows/finances/QFinancesMenu.py index 77adcf48..a09b8eed 100644 --- a/qt_ui/windows/finances/QFinancesMenu.py +++ b/qt_ui/windows/finances/QFinancesMenu.py @@ -26,15 +26,14 @@ class QHorizontalSeparationLine(QFrame): class FinancesLayout(QGridLayout): - def __init__(self, game: Game, player: bool, total_at_top: bool = False) -> None: + def __init__(self, game: Game, player: bool) -> None: super().__init__() self.row = itertools.count(0) income = Income(game, player) - if total_at_top: - self.add_total(game, income, player) - self.add_line() + self.add_total(game, income, player) + self.add_line() control_points = reversed( sorted(income.control_points, key=lambda c: c.income_per_turn) @@ -48,9 +47,7 @@ class FinancesLayout(QGridLayout): for building in buildings: self.add_building(building) - if not total_at_top: - self.add_line() - self.add_total(game, income, player) + self.setRowStretch(next(self.row), 1) def add_total(self, game, income, player): self.add_row( @@ -59,7 +56,6 @@ class FinancesLayout(QGridLayout): ) budget = game.coalition_for(player).budget self.add_row(middle="Balance", right=f"{budget:.1f}M") - self.setRowStretch(next(self.row), 1) def add_row( self, diff --git a/qt_ui/windows/intel.py b/qt_ui/windows/intel.py index 0a410704..bb169152 100644 --- a/qt_ui/windows/intel.py +++ b/qt_ui/windows/intel.py @@ -46,7 +46,7 @@ class ScrollingFrame(QFrame): class EconomyIntelTab(ScrollingFrame): def __init__(self, game: Game, player: bool) -> None: super().__init__() - self.addLayout(FinancesLayout(game, player=player, total_at_top=True)) + self.addLayout(FinancesLayout(game, player=player)) class IntelTableLayout(QGridLayout):