feat(ui): persist retained window layouts
This commit is contained in:
parent
a8e9503d2e
commit
921c388e2c
22 changed files with 705 additions and 141 deletions
18
src/AcDream.App/UI/IRetainedWindowStateController.cs
Normal file
18
src/AcDream.App/UI/IRetainedWindowStateController.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
namespace AcDream.App.UI;
|
||||
|
||||
/// <summary>Panel state that is not completely described by outer-frame bounds.</summary>
|
||||
public readonly record struct RetainedWindowState(
|
||||
bool Collapsed = false,
|
||||
bool Maximized = false,
|
||||
float? PersistedTop = null,
|
||||
float? PersistedHeight = null);
|
||||
|
||||
/// <summary>
|
||||
/// Optional state seam used by retained-window persistence. Bounds are restored
|
||||
/// first; the controller then reapplies collapsed/maximized presentation.
|
||||
/// </summary>
|
||||
public interface IRetainedWindowStateController
|
||||
{
|
||||
RetainedWindowState CaptureWindowState();
|
||||
void RestoreWindowState(RetainedWindowState state);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue