mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
made font references constants
This commit is contained in:
parent
ac6a106c6a
commit
9d67741310
@ -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] = {}
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
@ -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"])
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user