refactor(btn, img): rename btn to button and img to image

This commit is contained in:
Gabor Kiss-Vamosi
2023-09-14 20:12:31 +02:00
parent e91786ce49
commit 09c12d0f9c
366 changed files with 3271 additions and 3222 deletions

View File

@@ -96,10 +96,10 @@ list1.set_size(lv.pct(60), lv.pct(100))
list1.set_style_pad_row( 5, 0)
for i in range(15):
btn = lv.btn(list1)
btn.set_width(lv.pct(100))
btn.add_event( event_handler, lv.EVENT.CLICKED, None)
lab = lv.label(btn)
button = lv.button(list1)
button.set_width(lv.pct(100))
button.add_event( event_handler, lv.EVENT.CLICKED, None)
lab = lv.label(button)
lab.set_text("Item " + str(i))
#Select the first button by default
@@ -112,26 +112,26 @@ list2.set_size(lv.pct(40), lv.pct(100))
list2.align(lv.ALIGN.TOP_RIGHT, 0, 0)
list2.set_flex_flow(lv.FLEX_FLOW.COLUMN)
btn = list2.add_btn(None, "Top")
btn.add_event(event_handler_top, lv.EVENT.ALL, None)
lv.group_remove_obj(btn)
button = list2.add_button(None, "Top")
button.add_event(event_handler_top, lv.EVENT.ALL, None)
lv.group_remove_obj(button)
btn = list2.add_btn(lv.SYMBOL.UP, "Up")
btn.add_event(event_handler_up, lv.EVENT.ALL, None)
lv.group_remove_obj(btn)
button = list2.add_button(lv.SYMBOL.UP, "Up")
button.add_event(event_handler_up, lv.EVENT.ALL, None)
lv.group_remove_obj(button)
btn = list2.add_btn(lv.SYMBOL.LEFT, "Center")
btn.add_event(event_handler_center, lv.EVENT.ALL, None)
lv.group_remove_obj(btn)
button = list2.add_button(lv.SYMBOL.LEFT, "Center")
button.add_event(event_handler_center, lv.EVENT.ALL, None)
lv.group_remove_obj(button)
btn = list2.add_btn(lv.SYMBOL.DOWN, "Down")
btn.add_event(event_handler_dn, lv.EVENT.ALL, None)
lv.group_remove_obj(btn)
button = list2.add_button(lv.SYMBOL.DOWN, "Down")
button.add_event(event_handler_dn, lv.EVENT.ALL, None)
lv.group_remove_obj(button)
btn = list2.add_btn(None, "Bottom")
btn.add_event(event_handler_bottom, lv.EVENT.ALL, None)
lv.group_remove_obj(btn)
button = list2.add_button(None, "Bottom")
button.add_event(event_handler_bottom, lv.EVENT.ALL, None)
lv.group_remove_obj(button)
btn = list2.add_btn(lv.SYMBOL.SHUFFLE, "Shuffle")
btn.add_event(event_handler_swap, lv.EVENT.ALL, None)
lv.group_remove_obj(btn)
button = list2.add_button(lv.SYMBOL.SHUFFLE, "Shuffle")
button.add_event(event_handler_swap, lv.EVENT.ALL, None)
lv.group_remove_obj(button)