chore(color): implement publish/subscribe messaging to simplify code and further code consolidation (#7032)

This commit is contained in:
philmoz
2026-01-29 15:45:10 +10:00
committed by GitHub
parent 2579bc6132
commit 9a44335601
125 changed files with 1701 additions and 2054 deletions
+2 -2
View File
@@ -1500,7 +1500,7 @@ void LvglWidgetBox::build(lua_State *L)
{
window =
new Window(lvglManager->getCurrentParent(), {x, y, w, h}, lv_obj_create);
window->disableForcedScroll();
window->setWindowFlag(NO_FORCED_SCROLL);
window->setScrollHandler([=](coord_t x, coord_t y) { pcallFuncWith2Int(L, scrolledFunction, 0, x, y); });
lv_obj_add_flag(window->getLvObj(), LV_OBJ_FLAG_EVENT_BUBBLE);
if (luaScriptManager->isWidget() && !luaScriptManager->isFullscreen()) {
@@ -2472,7 +2472,7 @@ void LvglWidgetPage::build(lua_State *L)
showBackButton, prevActionFunction != LUA_REFNIL, nextActionFunction != LUA_REFNIL);
window = page->getBody();
window->disableForcedScroll();
window->setWindowFlag(NO_FORCED_SCROLL);
window->setScrollHandler([=](coord_t x, coord_t y) { pcallFuncWith2Int(L, scrolledFunction, 0, x, y); });
if (setFlex()) {
lv_flex_align_t align1 = (align.flags & RIGHT) ? LV_FLEX_ALIGN_END : (align.flags & CENTERED) ? LV_FLEX_ALIGN_CENTER : LV_FLEX_ALIGN_START;
-2
View File
@@ -104,8 +104,6 @@ class LuaScriptManager : public LuaEventHandler
class LuaWidget : public Widget, public LuaScriptManager
{
friend class LuaWidgetFactory;
public:
LuaWidget(const WidgetFactory* factory, Window* parent, const rect_t& rect,
int screenNum, int zoneNum, int zoneRectDataRef,