UI Enhancements.

This commit is contained in:
2026-03-28 18:01:49 +05:30
parent 79b120ff91
commit a90e3a0d84
15 changed files with 292 additions and 58 deletions

24
app/core/fonts.py Normal file
View File

@@ -0,0 +1,24 @@
"""Font loader - registers bundled Quicksand and Open Sans with Qt."""
import os
from PyQt6.QtGui import QFontDatabase
_ASSETS_DIR = os.path.join(os.path.dirname(__file__), "..", "..", "assets", "fonts")
_FONT_FILES = [
"Quicksand-Regular.ttf",
"Quicksand-Medium.ttf",
"Quicksand-SemiBold.ttf",
"Quicksand-Bold.ttf",
"OpenSans-Regular.ttf",
"OpenSans-SemiBold.ttf",
"OpenSans-Bold.ttf",
]
def load_fonts() -> None:
"""Register all bundled fonts with QFontDatabase. Call once after QApplication is created."""
fonts_dir = os.path.normpath(_ASSETS_DIR)
for filename in _FONT_FILES:
path = os.path.join(fonts_dir, filename)
if os.path.exists(path):
QFontDatabase.addApplicationFont(path)