update asserts

This commit is contained in:
Gabor Kiss-Vamosi
2021-02-08 09:53:03 +01:00
parent 956a367dbc
commit 7bec13c2b9
173 changed files with 4906 additions and 696 deletions

View File

@@ -0,0 +1,21 @@
//#include "../../../lvgl.h"
//
//void lv_example_obj_1(void)
//{
// lv_obj_t * obj1;
// obj1 = lv_obj_create(lv_scr_act(), NULL);
// lv_obj_set_size(obj1, 100, 50);
// lv_obj_align(obj1, NULL, LV_ALIGN_CENTER, -60, -30);
//
// static lv_style_t style_shadow;
// lv_style_init(&style_shadow);
// lv_style_set_shadow_width(&style_shadow, LV_STATE_DEFAULT, 10);
// lv_style_set_shadow_spread(&style_shadow, LV_STATE_DEFAULT, 5);
// lv_style_set_shadow_color(&style_shadow, LV_STATE_DEFAULT, LV_COLOR_BLUE);
//
// /*Copy the previous object (drag is already enabled)*/
// lv_obj_t * obj3;
// obj3 = lv_obj_create(lv_scr_act(), NULL);
// lv_obj_add_style(obj3, LV_OBJ_PART_MAIN, &style_shadow);
// lv_obj_align(obj3, NULL, LV_ALIGN_CENTER, 60, 30);
//}

View File

@@ -0,0 +1,20 @@
obj1 = lv.obj(lv.scr_act())
obj1.set_size(100, 50)
obj1.set_style(lv.style_plain_color)
obj1.align(None, lv.ALIGN.CENTER, -60, -30)
# Copy the previous object and enable drag
obj2 = lv.obj(lv.scr_act(), obj1)
obj2.set_style(lv.style_pretty_color)
obj2.align(None, lv.ALIGN.CENTER, 0, 0)
obj2.set_drag(True)
style_shadow = lv.style_t()
lv.style_copy(style_shadow, lv.style_pretty)
style_shadow.body.shadow.width = 6
style_shadow.body.radius = 800 # large enough to make it round
# Copy the previous object (drag is already enabled)
obj3 = lv.obj(lv.scr_act(), obj2)
obj3.set_style(style_shadow)
obj3.align(None, lv.ALIGN.CENTER, 60, 30)