App 2.27.1: accent colour only for styles drawn in it

Settings → Display now has the Overview style first with the accent
colour beside it; for styles with their own palette the accent field is
greyed out with a note. Styles are an enum, OverviewStyle, with
usesAccent (unit-tested). Emulator only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LhzAVaUyqcw5PkGjz4mWW6
This commit is contained in:
2026-10-24 21:28:39 +02:00
co-authored by Claude Opus 5.5
parent 4ef386a8d9
commit ef2ba89fba
10 changed files with 163 additions and 42 deletions
@@ -0,0 +1,35 @@
package com.evsuite.abrp;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
/** The Overview styles — pure JVM. */
public class OverviewStyleTest {
@Test
public void storedValuesRoundTrip() {
for (OverviewStyle style : OverviewStyle.values()) {
assertEquals(style, OverviewStyle.fromPref(style.name()));
}
}
@Test
public void oldAndUnknownValues() {
assertEquals(OverviewStyle.GAUGES, OverviewStyle.fromPref("DASHBOARD"));
assertEquals(OverviewStyle.TILES, OverviewStyle.fromPref(null));
assertEquals(OverviewStyle.TILES, OverviewStyle.fromPref("NOPE"));
}
@Test
public void onlyStylesDrawnInTheAccentOfferIt() {
assertTrue(OverviewStyle.TILES.usesAccent);
assertTrue(OverviewStyle.RETRO_ACCENT.usesAccent);
assertTrue(OverviewStyle.MG.usesAccent);
assertFalse(OverviewStyle.RETRO.usesAccent);
assertFalse(OverviewStyle.CARTOON.usesAccent);
assertFalse(OverviewStyle.NIXIE.usesAccent);
}
}