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
+6 -1
View File
@@ -141,9 +141,11 @@ class OutputLineButton : public ListLineButton
refresh(); refresh();
lv_obj_update_layout(lvobj); lv_obj_update_layout(lvobj);
if(e) {
auto param = lv_event_get_param(e); auto param = lv_event_get_param(e);
lv_event_send(lvobj, LV_EVENT_DRAW_MAIN, param); lv_event_send(lvobj, LV_EVENT_DRAW_MAIN, param);
} }
}
public: public:
OutputLineButton(Window* parent, uint8_t channel) : OutputLineButton(Window* parent, uint8_t channel) :
@@ -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