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
|
|
@ -94,6 +94,87 @@ public sealed class RetailWindowLayoutPersistenceTests : IDisposable
|
|||
Assert.True(state.Restored.Maximized);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Restore_OlderAuthoredGeometryRevision_ResetsOnlySavedExtent()
|
||||
{
|
||||
var store = new SettingsStore(PathName);
|
||||
store.SaveWindowLayout(
|
||||
"Alice",
|
||||
"800x600",
|
||||
WindowNames.Examination,
|
||||
new UiWindowLayout(
|
||||
44f,
|
||||
55f,
|
||||
310f,
|
||||
545f,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
AuthoredGeometryRevision: 0));
|
||||
|
||||
var root = new UiRoot { Width = 800, Height = 600 };
|
||||
RetailWindowHandle handle = Mount(
|
||||
root,
|
||||
WindowNames.Examination,
|
||||
authoredGeometryRevision: 1,
|
||||
width: 310f,
|
||||
height: 400f);
|
||||
using var persistence = new RetailWindowLayoutPersistence(
|
||||
root.WindowManager,
|
||||
store,
|
||||
() => "Alice",
|
||||
() => (800, 600));
|
||||
|
||||
persistence.RestoreAll();
|
||||
|
||||
Assert.Equal((44f, 55f), (handle.Left, handle.Top));
|
||||
Assert.Equal((310f, 400f), (handle.Width, handle.Height));
|
||||
UiWindowLayout migrated = Assert.IsType<UiWindowLayout>(
|
||||
store.LoadWindowLayout(
|
||||
"Alice",
|
||||
"800x600",
|
||||
WindowNames.Examination,
|
||||
default));
|
||||
Assert.Equal(1, migrated.AuthoredGeometryRevision);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RestoreNamed_OlderRevisionUsesMountedAuthoredExtent_NotCurrentSize()
|
||||
{
|
||||
var store = new SettingsStore(PathName);
|
||||
store.SaveNamedWindowLayout(
|
||||
"legacy",
|
||||
WindowNames.Examination,
|
||||
new UiWindowLayout(
|
||||
44f,
|
||||
55f,
|
||||
310f,
|
||||
545f,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
AuthoredGeometryRevision: 0));
|
||||
|
||||
var root = new UiRoot { Width = 800, Height = 600 };
|
||||
RetailWindowHandle handle = Mount(
|
||||
root,
|
||||
WindowNames.Examination,
|
||||
authoredGeometryRevision: 1,
|
||||
width: 310f,
|
||||
height: 400f);
|
||||
handle.ResizeTo(500f, 300f);
|
||||
using var persistence = new RetailWindowLayoutPersistence(
|
||||
root.WindowManager,
|
||||
store,
|
||||
() => "Alice",
|
||||
() => (800, 600));
|
||||
|
||||
persistence.RestoreNamed("legacy");
|
||||
|
||||
Assert.Equal((44f, 55f), (handle.Left, handle.Top));
|
||||
Assert.Equal((310f, 400f), (handle.Width, handle.Height));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DefaultPreLoginKey_NeverOverwritesCharacterLayouts()
|
||||
{
|
||||
|
|
@ -169,14 +250,17 @@ public sealed class RetailWindowLayoutPersistenceTests : IDisposable
|
|||
private static RetailWindowHandle Mount(
|
||||
UiRoot root,
|
||||
string name,
|
||||
IRetainedWindowStateController? state = null)
|
||||
IRetainedWindowStateController? state = null,
|
||||
int authoredGeometryRevision = 0,
|
||||
float width = 200f,
|
||||
float height = 100f)
|
||||
{
|
||||
var frame = new UiPanel
|
||||
{
|
||||
Left = 10f,
|
||||
Top = 20f,
|
||||
Width = 200f,
|
||||
Height = 100f,
|
||||
Width = width,
|
||||
Height = height,
|
||||
MinWidth = 100f,
|
||||
MinHeight = 80f,
|
||||
MaxWidth = 600f,
|
||||
|
|
@ -185,7 +269,11 @@ public sealed class RetailWindowLayoutPersistenceTests : IDisposable
|
|||
Resizable = true,
|
||||
};
|
||||
root.AddChild(frame);
|
||||
return root.RegisterWindow(name, frame, stateController: state);
|
||||
return root.RegisterWindow(
|
||||
name,
|
||||
frame,
|
||||
stateController: state,
|
||||
authoredGeometryRevision: authoredGeometryRevision);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue