Files
LiquidGUI/styles/Labels.py
Dunestorm 65456aa5c6 LiquidGUI [1.1.0.0] Dev
- Code cleanup & refactoring.
- Platform specific code.
2024-07-09 22:00:56 +01:00

26 lines
857 B
Python

from PyQt6.QtWidgets import QLabel
from PyQt6.QtGui import QFont
from PyQt6.QtCore import Qt
import styles
class MainLabel(QLabel):
""" Formatting for the main label. """
def __init__(self, value):
super().__init__()
self.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.setFont(QFont(styles.sublabel_font, 16, weight=QFont.Weight.Bold))
self.setText(value)
class SubLabel(QLabel):
""" Formatting for sub-labels. """
def __init__(self, value):
super().__init__()
self.setFont(QFont(styles.mainlabel_font, 10, weight=QFont.Weight.Bold))
self.setText(value)
class SubLabelValue(QLabel):
""" Formatting for values. """
def __init__(self):
super().__init__()
self.setAlignment(Qt.AlignmentFlag.AlignRight)
self.setFont(QFont(styles.sublabelvalue_font, 8))