App 2.35.0: the app takes on the Overview style's own colours
While the style shows its own palette (Sci-fi, Cartoon, Aviation, Nixie; Retro and Terminal with "Original"), the navigation, buttons and titles take it instead of the accent colour, e.g. turquoise for Retro (StylePalette, style_palettes.xml). Blueprint and Mascot are removed; a stored one opens Tiles. The navigation no longer saves view state, which crashed a restore across the wide and narrow layouts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LhzAVaUyqcw5PkGjz4mWW6
This commit is contained in:
@@ -36,7 +36,31 @@ public class OverviewStyleTest {
|
||||
assertTrue(OverviewStyle.TERMINAL.hasOriginal);
|
||||
assertFalse(OverviewStyle.CARTOON.usesAccent);
|
||||
assertFalse(OverviewStyle.NIXIE.usesAccent);
|
||||
assertTrue(OverviewStyle.MASCOT.usesAccent);
|
||||
assertTrue(OverviewStyle.CHRONOGRAPH.usesAccent);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void removedStylesFallBackToTiles() {
|
||||
assertEquals(OverviewStyle.TILES, OverviewStyle.fromPref("MASCOT"));
|
||||
assertEquals(OverviewStyle.TILES, OverviewStyle.fromPref("BLUEPRINT"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void ownPaletteForTheApp() {
|
||||
// Fixed palettes always; Retro and Terminal only with "Original colours".
|
||||
assertTrue(OverviewStyle.CARTOON.showsOwnPalette(false));
|
||||
assertTrue(OverviewStyle.RETRO.showsOwnPalette(true));
|
||||
assertFalse(OverviewStyle.RETRO.showsOwnPalette(false));
|
||||
assertFalse(OverviewStyle.CHRONOGRAPH.showsOwnPalette(true));
|
||||
// Every style shown in its own palette has the app's matching colours.
|
||||
for (OverviewStyle style : OverviewStyle.values()) {
|
||||
if (style.showsOwnPalette(true)) assertTrue(style.name(), StylePalette.overlay(style) != 0);
|
||||
else assertEquals(style.name(), 0, StylePalette.overlay(style));
|
||||
}
|
||||
assertEquals(AccentColor.HOLBORN_BLUE.overlay,
|
||||
StylePalette.appOverlay(OverviewStyle.RETRO, false, AccentColor.HOLBORN_BLUE));
|
||||
assertEquals(R.style.ThemeOverlay_EV_Style_Retro,
|
||||
StylePalette.appOverlay(OverviewStyle.RETRO, true, AccentColor.HOLBORN_BLUE));
|
||||
assertEquals("original_colours_RETRO", OverviewStyle.RETRO.originalKey());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user