Persist and restore main window state

Restore window geometry/state on startup and save them on exit. Adds YTSageApp._load_window_state() and calls it during UI init; saves Base64-encoded geometry/state via ConfigManager when closing. Adds default config keys "window_geometry" and "window_state". Includes error handling and debug logging to avoid failures if stored values are invalid.
This commit is contained in:
oop7
2026-06-14 20:19:40 +03:00
parent 8c9966000e
commit 72f9098a70
2 changed files with 26 additions and 0 deletions
+2
View File
@@ -96,6 +96,8 @@ class ConfigManager:
"preferred_audio_format": "best",
"audio_normalization": False,
"filename_format": "%(title)s_%(resolution)s_[%(id)s].%(ext)s",
"window_geometry": None,
"window_state": None,
"cached_versions": {
"ytdlp": {"version": None, "path": None, "last_check": 0, "path_mtime": 0},
"ffmpeg": {"version": None, "path": None, "last_check": 0, "path_mtime": 0},