From ec2c5c5bdc16b5a516b4d961e7074d0d11b73930 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Mon, 13 Jun 2022 11:08:45 +0200 Subject: [PATCH] Cleanup unused LvglWidgetFactory --- radio/src/gui/colorlcd/LvglWrapper.h | 33 ++-------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/radio/src/gui/colorlcd/LvglWrapper.h b/radio/src/gui/colorlcd/LvglWrapper.h index 1b79adc2f..fbfc233ac 100644 --- a/radio/src/gui/colorlcd/LvglWrapper.h +++ b/radio/src/gui/colorlcd/LvglWrapper.h @@ -25,38 +25,11 @@ #include #include "opentx_types.h" +void initLvglTheme(); + lv_color_t makeLvColor(uint32_t colorFlags); -class LvglWidgetFactory; typedef std::function LvObjConstructor; -typedef std::function LvStyleInitializer; - -class LvglWidgetFactory -{ - public: - LvglWidgetFactory(LvObjConstructor construct, LvStyleInitializer styleInitializer = nullptr) : - _construct(std::move(construct)), - _styleInitializer(std::move(styleInitializer)) - { - lv_style_init(&style); - styleInitialized = false; - }; - - lv_style_t style; - - inline lv_obj_t *construct(lv_obj_t *parent) { - if (!styleInitialized && _styleInitializer != nullptr) { - (_styleInitializer(this)); - styleInitialized = true; - } - return _construct(parent); - } - - private: - LvObjConstructor _construct; - LvStyleInitializer _styleInitializer; - bool styleInitialized; -}; class LvglWrapper { @@ -80,6 +53,4 @@ class LvglWrapper static void runNested(); }; -void initLvglTheme(); - #endif // _LVGLWRAPPER_H_