[GUI] Add grid settings to GUI and implement grid snapping

This commit is contained in:
ParantezTech
2026-07-31 13:20:14 +03:00
parent 544f588cfd
commit e28069c7e3
10 changed files with 249 additions and 46 deletions
@@ -61,6 +61,19 @@ public sealed class GuiSettingsTests
Assert.Equal(1000, settings.RefreshRate);
}
[Theory]
[InlineData("""{ }""", "Carousel")]
[InlineData("""{ "LibraryLayout": null }""", "Carousel")]
[InlineData("""{ "LibraryLayout": "sideways" }""", "Carousel")]
[InlineData("""{ "LibraryLayout": "grid" }""", "Grid")]
[InlineData("""{ "LibraryLayout": "Grid" }""", "Grid")]
public void NormalizeFromJson_LibraryLayout_FallsBackToCarousel(string json, string expected)
{
var settings = GuiSettings.NormalizeFromJson(json);
Assert.Equal(expected, settings.LibraryLayout);
}
[Fact]
public void NormalizeFromJson_CustomResolution_IsPreserved()
{