chore(color): Cleanup and optimise EdgeTxTheme class (#4013)
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
#include "radio_calibration.h"
|
||||
#include "view_main.h"
|
||||
#include "view_text.h"
|
||||
#include "theme.h"
|
||||
|
||||
#include "gui/colorlcd/LvglWrapper.h"
|
||||
#endif
|
||||
@@ -322,11 +323,6 @@ void generalDefault()
|
||||
strcpy(g_eeGeneral.currModelFilename, DEFAULT_MODEL_FILENAME);
|
||||
#endif
|
||||
|
||||
#if defined(COLORLCD)
|
||||
strcpy(g_eeGeneral.themeName, static_cast<EdgeTxTheme *>(theme)->getName());
|
||||
static_cast<EdgeTxTheme *>(theme)->init();
|
||||
#endif
|
||||
|
||||
#if defined(PXX2)
|
||||
setDefaultOwnerId();
|
||||
#endif
|
||||
@@ -1171,7 +1167,7 @@ void opentxResume()
|
||||
#if defined(COLORLCD)
|
||||
//TODO: needs to go into storageReadAll()
|
||||
TRACE("reloading theme");
|
||||
loadTheme();
|
||||
EdgeTxTheme::instance()->load();
|
||||
|
||||
// Force redraw
|
||||
ViewMain::instance()->invalidate();
|
||||
@@ -1534,7 +1530,7 @@ void opentxInit()
|
||||
BACKLIGHT_ENABLE();
|
||||
|
||||
#if defined(COLORLCD)
|
||||
loadTheme();
|
||||
EdgeTxTheme::instance()->load();
|
||||
if (g_eeGeneral.backlightMode == e_backlight_mode_off) {
|
||||
// no backlight mode off on color lcd radios
|
||||
g_eeGeneral.backlightMode = e_backlight_mode_keys;
|
||||
|
||||
Reference in New Issue
Block a user