fix(ui): restore modern spell formula presentation
Resolve spell-examination component cells through their DAT icon DIDs, project scarab and prismatic-taper formulas when ACE disables component enforcement, and version authored window geometry so stale examination sizes reset once without losing user layout behavior. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
3e31b0ac70
commit
d4ce64f56b
22 changed files with 307 additions and 41 deletions
|
|
@ -367,7 +367,8 @@ public sealed class SettingsStore
|
|||
ReadNodeFloat(node, "height", fallback.Height),
|
||||
ReadNodeBool(node, "visible", fallback.Visible),
|
||||
ReadNodeBool(node, "collapsed", fallback.Collapsed),
|
||||
ReadNodeBool(node, "maximized", fallback.Maximized));
|
||||
ReadNodeBool(node, "maximized", fallback.Maximized),
|
||||
ReadNodeInt(node, "authoredGeometryRevision", 0));
|
||||
}
|
||||
|
||||
// Version-1 migration: radar stored only X/Y and had no resolution key.
|
||||
|
|
@ -417,6 +418,7 @@ public sealed class SettingsStore
|
|||
["visible"] = layout.Visible,
|
||||
["collapsed"] = layout.Collapsed,
|
||||
["maximized"] = layout.Maximized,
|
||||
["authoredGeometryRevision"] = layout.AuthoredGeometryRevision,
|
||||
};
|
||||
root["version"] = CurrentSchemaVersion;
|
||||
WriteMutableRoot(root);
|
||||
|
|
@ -449,7 +451,8 @@ public sealed class SettingsStore
|
|||
ReadNodeFloat(node, "height", fallback.Height),
|
||||
ReadNodeBool(node, "visible", fallback.Visible),
|
||||
ReadNodeBool(node, "collapsed", fallback.Collapsed),
|
||||
ReadNodeBool(node, "maximized", fallback.Maximized));
|
||||
ReadNodeBool(node, "maximized", fallback.Maximized),
|
||||
ReadNodeInt(node, "authoredGeometryRevision", 0));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -484,6 +487,7 @@ public sealed class SettingsStore
|
|||
["visible"] = layout.Visible,
|
||||
["collapsed"] = layout.Collapsed,
|
||||
["maximized"] = layout.Maximized,
|
||||
["authoredGeometryRevision"] = layout.AuthoredGeometryRevision,
|
||||
};
|
||||
|
||||
private JsonObject LoadMutableRoot()
|
||||
|
|
@ -518,6 +522,12 @@ public sealed class SettingsStore
|
|||
catch { return fallback; }
|
||||
}
|
||||
|
||||
private static int ReadNodeInt(JsonObject node, string key, int fallback)
|
||||
{
|
||||
try { return node[key]?.GetValue<int>() ?? fallback; }
|
||||
catch { return fallback; }
|
||||
}
|
||||
|
||||
private static bool TryParseResolution(string key, out int width, out int height)
|
||||
{
|
||||
width = 0;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@ namespace AcDream.UI.Abstractions.Panels.Settings;
|
|||
/// <summary>
|
||||
/// Complete persisted state for one retained window at one screen resolution.
|
||||
/// Position and size are outer-frame pixels; panel flags retain the small amount
|
||||
/// of state that geometry alone cannot reproduce reliably.
|
||||
/// of state that geometry alone cannot reproduce reliably. The authored revision
|
||||
/// lets a window invalidate obsolete saved dimensions without discarding its
|
||||
/// position, visibility, or later user resizing.
|
||||
/// </summary>
|
||||
public readonly record struct UiWindowLayout(
|
||||
float X,
|
||||
|
|
@ -12,4 +14,5 @@ public readonly record struct UiWindowLayout(
|
|||
float Height,
|
||||
bool Visible,
|
||||
bool Collapsed,
|
||||
bool Maximized);
|
||||
bool Maximized,
|
||||
int AuthoredGeometryRevision = 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue