fix(micropython) update examples for new API (#3059)

Related: https://github.com/lvgl/lv_binding_micropython/issues/202
This commit is contained in:
Amir Gonnen
2022-01-29 19:39:11 +02:00
committed by GitHub
parent f6a61df3ae
commit c7a414bfc6
7 changed files with 9 additions and 11 deletions

View File

@@ -31,7 +31,7 @@ def event_cb(e):
txt_area.y1 = dsc.draw_area.y1 + (dsc.draw_area.get_height() - txt_size.y) // 2
txt_area.y2 = txt_area.y1 + txt_size.y - 1
lv.draw_label(txt_area, dsc.clip_area, label_dsc, value_txt, None)
dsc.draw_ctx.label(label_dsc, txt_area, value_txt, None)
#
# Custom drawer on the bar to display the current value

View File

@@ -34,7 +34,7 @@ def event_cb(e):
txt_area.y1 = dsc.draw_area.y1 + (dsc.draw_area.get_height() - txt_size.y) // 2
txt_area.y2 = txt_area.y1 + txt_size.y - 1
lv.draw_label(txt_area, dsc.clip_area, label_dsc, value_txt, None)
dsc.draw_ctx.label(label_dsc, txt_area, value_txt, None)
#
# Custom drawer on the bar to display the current value