refactor: centralize file handling, fix zoom display and cleanup

File handling (document/file.rs):
- move file operations from app/mod.rs to document/file.rs
- add open_file_dialog() for native file picker
- add collect_directory_siblings() for navigation context
- add open_document_from_path() as main entry point

Zoom/View (panels.rs, canvas.rs, model.rs):
- fix zoom display using ViewMode enum
- ViewMode::Fit shows Fit, ActualSize shows 100%, Custom shows percentage

Model/Update cleanup:
- adjust model.rs for new file handling
- update.rs: use centralized file functions
- document/mod.rs: re-exports for file module

i18n:
BB
ctua.ftl with new/changed strings"
A
- update noctua.ftl with new/changed strings"
This commit is contained in:
wfx 2026-01-08 12:18:13 +01:00
parent 4de63d8549
commit 4c10a80b67
8 changed files with 212 additions and 259 deletions

View file

@ -30,6 +30,9 @@ no_document_loaded = No document loaded.
## Labels
zoom = Zoom
tools = Tools
crop = Crop
scale = Scale
## Error messages
error-failed-to-open = Failed to open “{ $path }”.