File tree Expand file tree Collapse file tree
internal_filesystem/apps/com.example.camtest/assets Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -193,8 +193,8 @@ def build_ui():
193193 })
194194 image .set_src (image_dsc )
195195 status_label_cont = lv .obj (appscreen )
196- status_label_cont .set_size (lv . pct ( 60 ), lv . pct ( 50 ) )
197- status_label_cont .center ( )
196+ status_label_cont .set_size (width , height )
197+ status_label_cont .align ( lv . ALIGN . LEFT_MID , 0 , 0 )
198198 status_label_cont .set_style_bg_color (lv .color_white (), 0 )
199199 status_label_cont .set_style_bg_opa (66 , 0 )
200200 status_label_cont .set_style_border_width (0 , 0 )
@@ -254,6 +254,7 @@ def init_cam():
254254 print (f"camtest.py: webcam exception: { e } " )
255255
256256if cam and keepgoing :
257+ print ("Camera initialized, changing UI" )
257258 qr_button .remove_flag (lv .obj .FLAG .HIDDEN )
258259 snap_button .remove_flag (lv .obj .FLAG .HIDDEN )
259260 status_label_cont .add_flag (lv .obj .FLAG .HIDDEN )
@@ -267,6 +268,7 @@ def init_cam():
267268print ("camtest.py: stopping..." )
268269if cam :
269270 th .remove_event_cb (try_capture )
271+
270272if use_webcam :
271273 webcam .deinit (cam )
272274elif cam :
You can’t perform that action at this time.
0 commit comments