Remove the upgrade of opaque theme colors from before 0.1.3

Configs saved before 0.1.3 (without a menu blur) had their preset
background and primary colors made translucent on load. It's no longer
needed, so Theme drops it, along with ConfigManager.isSaved, which only
it used.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-09-30 21:47:45 +02:00
co-authored by claude
parent 653738568a
commit df5afe99e3
2 changed files with 0 additions and 31 deletions
@@ -163,14 +163,6 @@ public class ConfigManager {
} }
} }
/**
* Whether the config file has a value for {@code name} in this namespace,
* which tells which version last saved it.
*/
public boolean isSaved(String name) {
return getSaved(name) != null;
}
private JsonNode getSaved(String name) { private JsonNode getSaved(String name) {
JsonNode source = cachedJson != null ? cachedJson : loadAndCache(); JsonNode source = cachedJson != null ? cachedJson : loadAndCache();
if (source == null || !source.isObject()) if (source == null || !source.isObject())
@@ -81,29 +81,6 @@ public class Theme {
config.property("Widget Radius", WIDGET_RADIUS, "Corner rounding of buttons and cards"); config.property("Widget Radius", WIDGET_RADIUS, "Corner rounding of buttons and cards");
config.property("Font", FONT, "Font of every Saturn screen"); config.property("Font", FONT, "Font of every Saturn screen");
if (!parent.isSaved(Config.MENU_BLUR)) {
upgradeOpaqueColors();
}
}
/**
* Before 0.1.3 panels and cards were made translucent in code, and the
* background and primary colors were saved fully opaque. Saved colors that
* are an old default or preset get the translucency the colors now carry
* themselves; colors the player picked are left as they are. Runs only on
* configs from older versions, so a preset color later set opaque on
* purpose stays opaque.
*/
private static void upgradeOpaqueColors() {
for (Preset preset : PRESETS) {
if (BACKGROUND.value == (preset.background() | 0xFF000000)) {
BACKGROUND.value = preset.background();
}
if (PRIMARY.value == (preset.primary() | 0xFF000000)) {
PRIMARY.value = preset.primary();
}
}
} }
/** /**