Move BooruApp from app.py to main_window.py (no behavior change)
Step 12 of the gui/app.py + gui/preview.py structural refactor — the biggest single move out of app.py. The entire ~3020-line BooruApp QMainWindow class moves to its own module under gui/. The class body is byte-identical: every method, every signal connection, every private attribute access stays exactly as it was. main_window.py imports the helper classes that already moved out of app.py (SearchState, LogHandler, AsyncSignals, InfoPanel) directly from their canonical sibling modules at the top of the file, so the bare-name lookups inside BooruApp method bodies (`SearchState(...)`, `LogHandler(self._log_text)`, `AsyncSignals()`, `InfoPanel()`) keep resolving to the same class objects. Same package depth as app.py was, so no relative-import depth adjustment is needed for any of the lazy `..core.X` or `.preview` imports inside method bodies — they keep working through the preview.py shim until commit 14 swaps them to canonical paths. app.py grows the BooruApp re-export shim line. After this commit app.py is just imports + log + the four helpers (run, _apply_windows_dark_mode, _load_user_qss, _BASE_POPOUT_OVERLAY_QSS) + the shim block. Commit 13 carves the helpers out, commit 14 deletes the shims and the file. VERIFICATION: full method-cluster sweep (see docs/REFACTOR_PLAN.md "Commit 12 expanded verification" section), not the 7-item smoke test.
This commit is contained in:
parent
eded7790af
commit
da36c4a8f2
File diff suppressed because it is too large
Load Diff
3087
booru_viewer/gui/main_window.py
Normal file
3087
booru_viewer/gui/main_window.py
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user