INNER CODE UNIT · Python
__init__
HaxL0p4/L0p4Map · ui/app.py:48
def __init__(self):
pixmap = QPixmap(600,350)
pixmap.fill(QColor("#0d0d0d"))
painter = QPainter(pixmap)
logo_path = os.path.join(os.path.dirname(__file__), "assets", "screenLogo.png")
if os.path.exists(logo_path):
maxL = 540
maxA = 190
logo = QPixmap(logo_path).scaled(
maxL,
maxA,
Qt.AspectRatioMode.KeepAspectRatio,
Qt.TransformationMode.SmoothTransformation
)
x = (600 - logo.width()) // 2
painter.drawPixmap(x, 40, logo)