Add SD theme system

Adds installable SD-card themes with manifest downloads, theme registry parsing, themed home/chrome/settings/file browser support, FreeInk layout integration, theme documentation, and layout tests.
This commit is contained in:
Justin Mitchell
2026-06-28 01:44:38 -04:00
parent cbaa498ccc
commit 48aa3c8e02
69 changed files with 6352 additions and 358 deletions
+5
View File
@@ -9,6 +9,7 @@
#include "boot_sleep/BootActivity.h"
#include "boot_sleep/SleepActivity.h"
#include "browser/OpdsBookBrowserActivity.h"
#include "components/UITheme.h"
#include "home/CrashActivity.h"
#include "home/FileBrowserActivity.h"
#include "home/HomeActivity.h"
@@ -170,6 +171,7 @@ void ActivityManager::replaceActivity(std::unique_ptr<Activity>&& newActivity) {
}
void ActivityManager::goToFileTransfer() {
UITheme::getInstance().releaseSdThemeAssetMemory();
replaceActivity(std::make_unique<CrossPointWebServerActivity>(renderer, mappedInput));
}
@@ -184,6 +186,7 @@ void ActivityManager::goToRecentBooks() {
}
void ActivityManager::goToBrowser() {
UITheme::getInstance().releaseSdThemeAssetMemory();
const auto& servers = OPDS_STORE.getServers();
// Skip the server picker when there's only one server configured
if (servers.size() == 1) {
@@ -194,6 +197,7 @@ void ActivityManager::goToBrowser() {
}
void ActivityManager::goToReader(std::string path) {
UITheme::getInstance().releaseSdThemeAssetMemory();
replaceActivity(std::make_unique<ReaderActivity>(renderer, mappedInput, std::move(path)));
}
@@ -223,6 +227,7 @@ void ActivityManager::goHome(HomeMenuItem initialMenuItem) {
initialMenuItem = HomeMenuItem::SETTINGS_MENU;
}
}
UITheme::getInstance().reload();
replaceActivity(std::make_unique<HomeActivity>(renderer, mappedInput, initialMenuItem));
}
void ActivityManager::goToCrashReport() { replaceActivity(std::make_unique<CrashActivity>(renderer, mappedInput)); }