from PySide6.QtWidgets import QWidget, QVBoxLayout, QGridLayout, QLabel from PySide6.QtGui import QFont from ui.components.card import Card from PySide6.QtWidgets import ( QApplication, QMainWindow, QWidget, QLabel, QPushButton, QHBoxLayout, QVBoxLayout, QGridLayout, QStackedWidget, QSizePolicy ) from PySide6.QtCore import QSize from PySide6.QtGui import QFont class HomeScreen(QWidget): def __init__(self): super().__init__() root = QVBoxLayout(self) root.setContentsMargins(18, 16, 18, 16) root.setSpacing(16) hdr = QHBoxLayout() title = QLabel("Dashboard") title.setFont(QFont("", 22, 600)) hint = QLabel("Premium UI • 1024×600") hint.setStyleSheet("color: rgba(138,147,166,0.9);") hdr.addWidget(title) hdr.addStretch(1) hdr.addWidget(hint) grid = QGridLayout() grid.setContentsMargins(0, 0, 0, 0) grid.setHorizontalSpacing(16) grid.setVerticalSpacing(16) # 2×2 cards grid.addWidget(Card("MEDIA", "No track", "Tap to open", "♫"), 0, 0) grid.addWidget(Card("MAP / TRACK", "Idle", "Last trip: —", "⌁"), 0, 1) grid.addWidget(Card("CAR STATUS", "OK", "OBD: not connected", "⛭"), 1, 0) grid.addWidget(Card("CLOUD / YOUBLE", "Offline", "No sync yet", "☁"), 1, 1) root.addLayout(hdr) root.addLayout(grid, 1)