feat(settings): persist the theme through the settings binding

The palette lives in Lua, so C++ stores the name only and ui.setTheme()
writes through here before rebuilding and repainting.
This commit is contained in:
2026-08-04 20:44:08 -04:00
parent 291f0f20b5
commit e85adfa757
7 changed files with 60 additions and 6 deletions
+6
View File
@@ -26,6 +26,7 @@ struct Log : LogProvider {
struct Settings : SettingsProvider {
int32_t degrees = 0;
std::string tz = "UTC0";
std::string themeName = "light";
int32_t rotation() const override { return degrees; }
Status setRotation(int32_t value) override {
degrees = value;
@@ -36,6 +37,11 @@ struct Settings : SettingsProvider {
tz = value;
return Status::success();
}
std::string theme() const override { return themeName; }
Status setTheme(const std::string& value) override {
themeName = value;
return Status::success();
}
};
struct Sys : SysProvider {