diff --git a/qt_ui/uiconstants.py b/qt_ui/uiconstants.py index d9dc1860..85a1c788 100644 --- a/qt_ui/uiconstants.py +++ b/qt_ui/uiconstants.py @@ -20,6 +20,14 @@ URLS : Dict[str, str] = { LABELS_OPTIONS = ["Full", "Abbreviated", "Dot Only", "Off"] SKILL_OPTIONS = ["Average", "Good", "High", "Excellent"] +FONT_SIZE = 8 +FONT_NAME = "Arial" +# FONT = QFont("Arial", 12, weight=5, italic=True) +FONT_PRIMARY = QFont(FONT_NAME, FONT_SIZE, weight=5, italic=False) +FONT_PRIMARY_I = QFont(FONT_NAME, FONT_SIZE, weight=5, italic=True) +FONT_PRIMARY_B = QFont(FONT_NAME, FONT_SIZE, weight=75, italic=False) +FONT_MAP = QFont(FONT_NAME, 10, weight=75, italic=False) + # new themes can be added here THEMES: Dict[int, Dict[str, str]] = { 0: {'themeName': 'Vanilla', @@ -50,10 +58,7 @@ COLORS: Dict[str, QColor] = { "red_transparent": QColor(255, 125, 125, 32) } - -CP_SIZE = 25 -FONT = QFont("Arial", 12, weight=5, italic=True) - +CP_SIZE = 24 AIRCRAFT_ICONS: Dict[str, QPixmap] = {} VEHICLES_ICONS: Dict[str, QPixmap] = {} diff --git a/qt_ui/widgets/map/QLiberationMap.py b/qt_ui/widgets/map/QLiberationMap.py index 1f18d11e..737f8ebf 100644 --- a/qt_ui/widgets/map/QLiberationMap.py +++ b/qt_ui/widgets/map/QLiberationMap.py @@ -202,9 +202,9 @@ class QLiberationMap(QGraphicsView): for cp in self.game.theater.controlpoints: pos = self._transform_point(cp.position) - text = scene.addText(cp.name, font=QFont("Trebuchet MS", 10, weight=5, italic=False)) + text = scene.addText(cp.name, font=CONST.FONT_MAP) text.setPos(pos[0] + CONST.CP_SIZE, pos[1] - CONST.CP_SIZE / 2) - text = scene.addText(cp.name, font=QFont("Trebuchet MS", 10, weight=5, italic=False)) + text = scene.addText(cp.name, font=CONST.FONT_MAP) text.setDefaultTextColor(Qt.white) text.setPos(pos[0] + CONST.CP_SIZE + 1, pos[1] - CONST.CP_SIZE / 2 + 1) diff --git a/qt_ui/widgets/map/QLiberationScene.py b/qt_ui/widgets/map/QLiberationScene.py index c13ac0fe..c6989298 100644 --- a/qt_ui/widgets/map/QLiberationScene.py +++ b/qt_ui/widgets/map/QLiberationScene.py @@ -1,7 +1,7 @@ from PySide2.QtGui import QFont from PySide2.QtWidgets import QGraphicsScene -from qt_ui.uiconstants import COLORS +import qt_ui.uiconstants as CONST class QLiberationScene(QGraphicsScene): @@ -9,5 +9,5 @@ class QLiberationScene(QGraphicsScene): def __init__(self, parent): super().__init__(parent) item = self.addText("No save file found. Go to \"File/New Game\" to setup a new campaign.", - QFont("Arial", 14, weight=5)) - item.setDefaultTextColor(COLORS["white"]) + CONST.FONT_PRIMARY) + item.setDefaultTextColor(CONST.COLORS["white"]) diff --git a/qt_ui/windows/QNewGameWizard.py b/qt_ui/windows/QNewGameWizard.py index 3fd56fb3..cecd0ea4 100644 --- a/qt_ui/windows/QNewGameWizard.py +++ b/qt_ui/windows/QNewGameWizard.py @@ -140,7 +140,7 @@ class FactionSelection(QtWidgets.QWizardPage): self.setTitle("Faction selection") self.setSubTitle("\nChoose the two opposing factions and select the player side.") self.setPixmap(QtWidgets.QWizard.LogoPixmap, - QtGui.QPixmap('./resources/ui/wizard/logo1.png')) + QtGui.QPixmap('./resources/ui/misc/generator.png')) self.setMinimumHeight(250) @@ -167,10 +167,10 @@ class FactionSelection(QtWidgets.QWizardPage): # Unit Preview self.blueSideRecap = QtWidgets.QLabel("") - self.blueSideRecap.setFont(QtGui.QFont("Arial", italic=True)) + self.blueSideRecap.setFont(CONST.FONT_PRIMARY_I) self.blueSideRecap.setWordWrap(True) self.redSideRecap = QtWidgets.QLabel("") - self.redSideRecap.setFont(QtGui.QFont("Arial", italic=True)) + self.redSideRecap.setFont(CONST.FONT_PRIMARY_I) self.redSideRecap.setWordWrap(True) # Link form fields