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();
lv_obj_update_layout(lvobj);
auto param = lv_event_get_param(e);
lv_event_send(lvobj, LV_EVENT_DRAW_MAIN, param);
if(e) {
auto param = lv_event_get_param(e);
lv_event_send(lvobj, LV_EVENT_DRAW_MAIN, param);
}
}
public:
@@ -164,7 +166,10 @@ class OutputLineButton : public ListLineButton
LV_GRID_ALIGN_CENTER, 0, 1);
#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