ulyssa / modalkit

A Rust library for building modal editing applications
Apache License 2.0
49 stars 5 forks source link

Update layout save/restore to support zoom & focus #143

Open Andrew-Collins opened 1 month ago

Andrew-Collins commented 1 month ago

Hi,

This PR is to support restoring layouts with with zoom and focus. Related issues:

A new struct WindowLayoutStorage has been created to store: the windows layout, which window is in focus, and if the focused window is zoomed.

TabLayoutDescription has been updated to hold this struct in place of WindowLayoutStorage as well as store the currently selected tab.

I am not set on the name WindowLayoutStorage; would you be open to naming it TabLayoutDescription, and rename TablayoutDescription to AppLayoutDescription or something similar?

This seems more logical to me as currently TabLayoutDescription does not hold the layout of a tab, but rather the layout of the top level application.

Keen to hear your thoughts. :)