refactor: fix typos

This commit is contained in:
Gabor Kiss-Vamosi
2023-11-15 22:47:53 +01:00
parent 4044856553
commit b56107ae05
9 changed files with 16 additions and 16 deletions

View File

@@ -8,7 +8,7 @@ def scroll_event_cb(e):
r = cont.get_height() * 7 // 10
child_cnt = cont.get_child_conut()
child_cnt = cont.get_child_count()
for i in range(child_cnt):
child = cont.get_child(i)
child_a = lv.area_t()

View File

@@ -13,7 +13,7 @@ def event_handler(e):
else:
currentButton = obj
parent = obj.get_parent()
for i in range( parent.get_child_conut()):
for i in range( parent.get_child_count()):
child = parent.get_child(i)
if child == currentButton:
child.add_state(lv.STATE.CHECKED)
@@ -51,7 +51,7 @@ def event_handler_center(e):
if currentButton == None:
return
parent = currentButton.get_parent()
pos = parent.get_child_conut() // 2
pos = parent.get_child_count() // 2
currentButton.move_to_index(pos)
currentButton.scroll_to_view(lv.ANIM.ON)
@@ -82,7 +82,7 @@ def event_handler_swap(e):
code = e.get_code()
obj = e.get_target_obj()
if code == lv.EVENT.CLICKED:
cnt = list1.get_child_conut()
cnt = list1.get_child_count()
for i in range(100):
if cnt > 1:
obj = list1.get_child(urandom.getrandbits(32) % cnt )

View File

@@ -1,5 +1,5 @@
# Create a Tab view object
tabview = lv.tabview(lv.screen_active(), lv.DIR.TOP, 50)
tabview = lv.tabview(lv.screen_active())
# Add 3 tabs (the tabs are page (lv_page) and can be scrolled
tab1 = tabview.add_tab("Tab 1")

View File

@@ -1,6 +1,6 @@
# Create a Tab view object
tabview = lv.tabview(lv.screen_active(), lv.DIR.LEFT, 80)
tabview = lv.tabview(lv.screen_active())
tabview.set_style_bg_color(lv.palette_lighten(lv.PALETTE.RED, 2), 0)