Skip to content

Commit 0a061b8

Browse files
Improve widget info debug print
1 parent 3fef5dd commit 0a061b8

File tree

1 file changed

+5
-2
lines changed
  • internal_filesystem/lib/mpos

1 file changed

+5
-2
lines changed

internal_filesystem/lib/mpos/util.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ def print_lvgl_widget(obj, depth=0):
1616
if obj:
1717
label = ""
1818
hidden = ""
19+
editable = "editable"
1920
obj_area = lv.area_t()
2021
obj.get_coords(obj_area)
2122
if obj.has_flag(lv.obj.FLAG.HIDDEN):
2223
hidden = "hidden "
24+
if not obj.is_editable():
25+
editable = "not editable "
2326
if isinstance(obj,lv.label):
24-
label = f" has label '{obj.get_text()}'"
27+
label = f" with label '{obj.get_text()}'"
2528
padding = " " * depth
26-
print(f"{padding}{hidden}{obj} with abs position {obj_area.x1}x{obj_area.y1} and size {obj_area.get_width()}x{obj_area.get_height()}{label}")
29+
print(f"{padding}{obj} pos:{obj_area.x1}x{obj_area.y1} size:{obj_area.get_width()}x{obj_area.get_height()} {hidden}{editable} {label}")
2730
for childnr in range(obj.get_child_count()):
2831
print_lvgl_widget(obj.get_child(childnr), depth+1)
2932
else:

0 commit comments

Comments
 (0)