Condense budget and intel sections of the top panel.

Budget and Intel panels now house a single button instead of separate Details buttons. Makes the top bar more compact and can fit in a 1080p monitor now.
This commit is contained in:
HerrTom
2021-04-25 18:38:45 -07:00
committed by GitHub
parent 5c0f6cf65e
commit fa5d64022d
2 changed files with 27 additions and 14 deletions

View File

@@ -14,18 +14,14 @@ class QBudgetBox(QGroupBox):
super(QBudgetBox, self).__init__("Budget")
self.game = game
self.money_icon = QLabel()
self.money_icon.setPixmap(CONST.ICONS["Money"])
self.money_amount = QLabel()
self.finances = QPushButton("Details")
self.finances = QPushButton()
self.finances.setDisabled(True)
self.finances.setProperty("style", "btn-primary")
self.finances.setIcon(CONST.ICONS["Money"])
self.finances.clicked.connect(self.openFinances)
self.layout = QHBoxLayout()
self.layout.addWidget(self.money_icon)
self.layout.addWidget(self.money_amount)
self.layout.addWidget(self.finances)
self.setLayout(self.layout)
@@ -35,7 +31,7 @@ class QBudgetBox(QGroupBox):
:param budget: Current money available
:param reward: Planned reward for next turn
"""
self.money_amount.setText(
self.finances.setText(
str(round(budget, 2)) + "M (+" + str(round(reward, 2)) + "M)"
)