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

@@ -5,12 +5,12 @@
void lv_example_image_1(void)
{
LV_IMAGE_DECLARE(img_cogwheel_argb);
lv_obj_t * img1 = lv_image_create(lv_scr_act());
lv_obj_t * img1 = lv_image_create(lv_screen_active());
lv_image_set_src(img1, &img_cogwheel_argb);
lv_obj_align(img1, LV_ALIGN_CENTER, 0, -20);
lv_obj_set_size(img1, 200, 200);
lv_obj_t * img2 = lv_image_create(lv_scr_act());
lv_obj_t * img2 = lv_image_create(lv_screen_active());
lv_image_set_src(img2, LV_SYMBOL_OK "Accept");
lv_obj_align_to(img2, img1, LV_ALIGN_OUT_BOTTOM_MID, 0, 20);
}

View File

@@ -16,11 +16,11 @@ image_cogwheel_argb = lv.image_dsc_t({
'data': png_data
})
image1 = lv.image(lv.scr_act())
image1 = lv.image(lv.screen_active())
image1.set_src(image_cogwheel_argb)
image1.align(lv.ALIGN.CENTER, 0, -20)
image1.set_size(200, 200)
image2 = lv.image(lv.scr_act())
image2 = lv.image(lv.screen_active())
image2.set_src(lv.SYMBOL.OK + "Accept")
image2.align_to(image1, lv.ALIGN.OUT_BOTTOM_MID, 0, 20)

View File

@@ -31,7 +31,7 @@ void lv_example_image_2(void)
/*Now create the actual image*/
LV_IMAGE_DECLARE(img_cogwheel_argb)
img1 = lv_image_create(lv_scr_act());
img1 = lv_image_create(lv_screen_active());
lv_image_set_src(img1, &img_cogwheel_argb);
lv_obj_align(img1, LV_ALIGN_RIGHT_MID, -20, 0);
@@ -52,7 +52,7 @@ static void slider_event_cb(lv_event_t * e)
static lv_obj_t * create_slider(lv_color_t color)
{
lv_obj_t * slider = lv_slider_create(lv_scr_act());
lv_obj_t * slider = lv_slider_create(lv_screen_active());
lv_slider_set_range(slider, 0, 255);
lv_obj_set_size(slider, 10, 200);
lv_obj_set_style_bg_color(slider, color, LV_PART_KNOB);

View File

@@ -17,7 +17,7 @@ image_cogwheel_argb = lv.image_dsc_t({
})
def create_slider(color):
slider = lv.slider(lv.scr_act())
slider = lv.slider(lv.screen_active())
slider.set_range(0, 255)
slider.set_size(10, 200)
slider.set_style_bg_color(color, lv.PART.KNOB)
@@ -52,7 +52,7 @@ blue_slider.align_to(green_slider, lv.ALIGN.OUT_RIGHT_MID, 25, 0)
intense_slider.align_to(blue_slider, lv.ALIGN.OUT_RIGHT_MID, 25, 0)
# Now create the actual image
image1 = lv.image(lv.scr_act())
image1 = lv.image(lv.screen_active())
image1.set_src(image_cogwheel_argb)
image1.align(lv.ALIGN.RIGHT_MID, -20, 0)

View File

@@ -20,7 +20,7 @@ void lv_example_image_3(void)
LV_IMAGE_DECLARE(img_cogwheel_argb);
/*Now create the actual image*/
lv_obj_t * img = lv_image_create(lv_scr_act());
lv_obj_t * img = lv_image_create(lv_screen_active());
lv_image_set_src(img, &img_cogwheel_argb);
lv_obj_align(img, LV_ALIGN_CENTER, 50, 50);
lv_image_set_pivot(img, 0, 0); /*Rotate around the top left corner*/

View File

@@ -28,7 +28,7 @@ def set_zoom(image, v):
#
# Now create the actual image
image = lv.image(lv.scr_act())
image = lv.image(lv.screen_active())
image.set_src(image_cogwheel_argb)
image.align(lv.ALIGN.CENTER, 50, 50)
image.set_pivot(0, 0) # Rotate around the top left corner

View File

@@ -20,7 +20,7 @@ void lv_example_image_4(void)
lv_style_set_image_recolor_opa(&style, LV_OPA_COVER);
lv_style_set_image_recolor(&style, lv_color_black());
lv_obj_t * img = lv_image_create(lv_scr_act());
lv_obj_t * img = lv_image_create(lv_screen_active());
lv_obj_add_style(img, &style, 0);
lv_image_set_src(img, &img_skew_strip);
lv_obj_set_size(img, 150, 100);

View File

@@ -27,7 +27,7 @@ style.set_bg_opa(lv.OPA.COVER)
style.set_image_recolor_opa(lv.OPA.COVER)
style.set_image_recolor(lv.color_black())
image = lv.image(lv.scr_act())
image = lv.image(lv.screen_active())
image.add_style(style, 0)
image.set_src(image_skew_strip)
image.set_size(150, 100)