chore(color): Cleanup and optimise EdgeTxTheme class (#4013)

This commit is contained in:
philmoz
2023-09-21 19:39:05 +10:00
committed by GitHub
parent 4d148e5c0c
commit 0aff002c8a
35 changed files with 309 additions and 677 deletions
@@ -132,23 +132,6 @@ bool RadioLayout::CustomScreenData::isEmpty() const
return strlen(layoutId) == 0;
}
void RadioTheme::init(const char* themeName, ThemeData& themeData)
{
memset(&themeData, 0, sizeof(ThemeData));
memcpy(&themeData.themeName, themeName, THEME_NAME_LEN);
PersistentData& persistentData = themeData.themePersistentData;
persistentData.options[0].type =
zoneValueEnumFromType(ZoneOption::Type::Color);
setZoneOptionValue(persistentData.options[0].value, (unsigned int)WHITE);
persistentData.options[1].type =
zoneValueEnumFromType(ZoneOption::Type::Color);
setZoneOptionValue(persistentData.options[1].value, (unsigned int)RED);
}
void RadioLayout::init(const char* layoutId, CustomScreens& customScreens)
{
memset(&customScreens, 0, sizeof(CustomScreens));