fix(color): outputs in portrait mode (#2489)

Fixes #2442
This commit is contained in:
Raphael Coeffic
2022-10-09 20:49:24 +10:00
committed by GitHub
parent 78e2bb05a2
commit a8f1973507
+8 -3
View File
@@ -141,8 +141,10 @@ class OutputLineButton : public ListLineButton
refresh(); refresh();
lv_obj_update_layout(lvobj); lv_obj_update_layout(lvobj);
auto param = lv_event_get_param(e); if(e) {
lv_event_send(lvobj, LV_EVENT_DRAW_MAIN, param); auto param = lv_event_get_param(e);
lv_event_send(lvobj, LV_EVENT_DRAW_MAIN, param);
}
} }
public: public:
@@ -164,7 +166,10 @@ class OutputLineButton : public ListLineButton
LV_GRID_ALIGN_CENTER, 0, 1); LV_GRID_ALIGN_CENTER, 0, 1);
#endif #endif
lv_obj_add_event_cb(lvobj, OutputLineButton::on_draw, LV_EVENT_DRAW_MAIN, nullptr); lv_obj_update_layout(parent->getLvObj());
if(lv_obj_is_visible(lvobj)) delayed_init(nullptr);
lv_obj_add_event_cb(lvobj, OutputLineButton::on_draw, LV_EVENT_DRAW_MAIN_BEGIN, nullptr);
} }
void refresh() override void refresh() override