Round balance and income in the finance window.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1983
This commit is contained in:
Benjamin Fischer 2022-03-12 22:55:44 +01:00 committed by GitHub
parent 2c10d3f5b2
commit da4bd8120b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,10 +55,10 @@ class FinancesLayout(QGridLayout):
def add_total(self, game, income, player): def add_total(self, game, income, player):
self.add_row( self.add_row(
middle=f"Income multiplier: {income.multiplier:.1f}", middle=f"Income multiplier: {income.multiplier:.1f}",
right=f"<b>{income.total}M</b>", right=f"<b>{income.total:.1f}M</b>",
) )
budget = game.coalition_for(player).budget budget = game.coalition_for(player).budget
self.add_row(middle="Balance", right=f"<b>{budget}M</b>") self.add_row(middle="Balance", right=f"<b>{budget:.1f}M</b>")
self.setRowStretch(next(self.row), 1) self.setRowStretch(next(self.row), 1)
def add_row( def add_row(