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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user