mirror of
https://github.com/par274/sharpemu.git
synced 2026-08-01 15:39:47 +08:00
[GUI] Add grid settings to GUI and implement grid snapping (#729)
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user