Add match, turn and history views with a dark theme

- Top bar switching between Deck, Match, Turn and History views
- Match view: life, player counters, commanders, emblems, zone counts,
  turn timer and timeouts, land drops used/allowed, play/draw and Bo3
  draw counts, with the deck view below
- Turn view: per-player and total stats per turn with history, plus
  whole-game totals and land drops
- History: every finished game (colours, winner, who was on the play);
  click to reopen it in the other views; imports Player-prev.log
- Customize menu to show/hide items and an Arrange dialog to reorder
  deck sections and turn stats, remembered across sessions
- Static dark theme with mint accent, rounded corners, larger text
- Commanders tracked separately from emblems, with location and tax
- Quieter, non-sticky warning for cards lost to MTGA log gaps
- Correct Scryfall images for tokens

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aeth3randClaude Opus 5.5 committed 2026-10-16 11:18:44 -04:00
1 parent 7dc2ce0da8
commit 5b3c8c8e63
22 files changed
+2599 -193

No files matched your search

+10 -2
View File
@@ -10,7 +10,9 @@ from PySide6.QtWidgets import QApplication
from . import paths
from .carddb import CardDB
from .history import HistoryStore
from .images import ImageCache
from .ui import theme
from .ui.main_window import MainWindow
@@ -31,16 +33,22 @@ def main() -> int:
app = QApplication([sys.argv[0], *qt_args])
app.setApplicationName("MTGA Assistant")
app.setDesktopFileName("mtga-assistant") # Wayland app_id, usable in Hyprland window rules
theme.apply(app)
mtga_dir = paths.find_mtga_dir(cfg)
db_path = paths.find_card_db(mtga_dir) if mtga_dir else None
cards = CardDB(db_path)
images = ImageCache(paths.CACHE_DIR, cards, cfg.cache_max_mb * 1024 * 1024)
history = HistoryStore(paths.DATA_DIR / "history.db", cfg.history_max_mb)
log_path = paths.find_log_path(cfg)
if args.replay:
win = MainWindow(cards, images, args.replay, replay_rate=args.rate)
win = MainWindow(cards, images, history, args.replay, replay_rate=args.rate)
else:
win = MainWindow(cards, images, paths.find_log_path(cfg))
win = MainWindow(cards, images, history, log_path)
if log_path is not None:
# Matches from the previous MTGA session are only in Player-prev.log.
win.import_history(log_path.with_name("Player-prev.log"))
app.aboutToQuit.connect(win.shutdown)
win.show()
return app.exec()