pymmcore-plus / napari-micromanager

GUI interface between napari and micromanager powered by pymmcore-plus and pymmcore-widgets
https://pymmcore-plus.github.io/napari-micromanager/
BSD 3-Clause "New" or "Revised" License
61 stars 21 forks source link

feat: restore the last napari-micromanager layout at startup #317

Open fdrgsp opened 8 months ago

fdrgsp commented 8 months ago

with this PR, when we save the state of the QMainWindow in a json file so that when we re-open napari-micromanager again the saved layout is restored.

the json file has two keys:

The json file is saved in the appdirs.user_data_dir path in a folder named napari_micromanager.

This PR also adds a ScrollableWidget to house the pymmcore_widgets. This allows for easy docking of widgets either above or below others, ensuring they remain within the monitor's display area and do not overflow off-screen.

codecov[bot] commented 8 months ago

Codecov Report

Attention: Patch coverage is 90.00000% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 79.23%. Comparing base (4c625fa) to head (bb95a68).

Files Patch % Lines
src/napari_micromanager/_gui_objects/_toolbar.py 89.83% 6 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #317 +/- ## ========================================== + Coverage 78.24% 79.23% +0.99% ========================================== Files 13 13 Lines 625 684 +59 ========================================== + Hits 489 542 +53 - Misses 136 142 +6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.