refactor: scr -> screen, act->active, del->delete, remove in obj_clear_flag/state

This commit is contained in:
Gabor Kiss-Vamosi
2023-10-12 20:37:27 +02:00
parent 0ff2d1c2e4
commit 9ec5417dd3
468 changed files with 1330 additions and 1288 deletions

View File

@@ -6,10 +6,10 @@ static void value_changed_event_cb(lv_event_t * e);
void lv_example_arc_1(void)
{
lv_obj_t * label = lv_label_create(lv_scr_act());
lv_obj_t * label = lv_label_create(lv_screen_active());
/*Create an Arc*/
lv_obj_t * arc = lv_arc_create(lv_scr_act());
lv_obj_t * arc = lv_arc_create(lv_screen_active());
lv_obj_set_size(arc, 150, 150);
lv_arc_set_rotation(arc, 135);
lv_arc_set_bg_angles(arc, 0, 270);

View File

@@ -7,10 +7,10 @@ def value_changed_event_cb(e,label):
# Rotate the label to the current position of the arc
arc.rotate_obj_to_angle(label, 25)
label = lv.label(lv.scr_act())
label = lv.label(lv.screen_active())
# Create an Arc
arc = lv.arc(lv.scr_act())
arc = lv.arc(lv.screen_active())
arc.set_size(150, 150)
arc.set_rotation(135)
arc.set_bg_angles(0, 270)

View File

@@ -13,11 +13,11 @@ static void set_angle(void * obj, int32_t v)
void lv_example_arc_2(void)
{
/*Create an Arc*/
lv_obj_t * arc = lv_arc_create(lv_scr_act());
lv_obj_t * arc = lv_arc_create(lv_screen_active());
lv_arc_set_rotation(arc, 270);
lv_arc_set_bg_angles(arc, 0, 360);
lv_obj_remove_style(arc, NULL, LV_PART_KNOB); /*Be sure the knob is not displayed*/
lv_obj_clear_flag(arc, LV_OBJ_FLAG_CLICKABLE); /*To not allow adjusting by click*/
lv_obj_remove_flag(arc, LV_OBJ_FLAG_CLICKABLE); /*To not allow adjusting by click*/
lv_obj_center(arc);
lv_anim_t a;

View File

@@ -5,11 +5,11 @@ def set_angle(obj, v):
# Create an arc which acts as a loader.
#
# Create an Arc
arc = lv.arc(lv.scr_act())
arc = lv.arc(lv.screen_active())
arc.set_rotation(270)
arc.set_bg_angles(0, 360)
arc.remove_style(None, lv.PART.KNOB) # Be sure the knob is not displayed
arc.clear_flag(lv.obj.FLAG.CLICKABLE) #To not allow adjusting by click
arc.remove_flag(lv.obj.FLAG.CLICKABLE) #To not allow adjusting by click
arc.center()
a = lv.anim_t()