2021-04-08 13:07:48 +02:00
|
|
|
#include "../../lv_examples.h"
|
2021-02-14 14:56:34 +01:00
|
|
|
#if LV_BUILD_EXAMPLES
|
|
|
|
|
|
|
|
void lv_example_obj_1(void)
|
|
|
|
{
|
|
|
|
lv_obj_t * obj1;
|
2021-03-25 13:36:50 +01:00
|
|
|
obj1 = lv_obj_create(lv_scr_act());
|
2021-02-14 14:56:34 +01:00
|
|
|
lv_obj_set_size(obj1, 100, 50);
|
2021-03-25 16:14:17 +01:00
|
|
|
lv_obj_align(obj1, LV_ALIGN_CENTER, -60, -30);
|
2021-02-14 14:56:34 +01:00
|
|
|
|
|
|
|
static lv_style_t style_shadow;
|
|
|
|
lv_style_init(&style_shadow);
|
|
|
|
lv_style_set_shadow_width(&style_shadow, 10);
|
|
|
|
lv_style_set_shadow_spread(&style_shadow, 5);
|
2021-02-23 15:03:06 +01:00
|
|
|
lv_style_set_shadow_color(&style_shadow, lv_color_blue());
|
2021-02-14 14:56:34 +01:00
|
|
|
|
|
|
|
lv_obj_t * obj3;
|
2021-03-25 13:36:50 +01:00
|
|
|
obj3 = lv_obj_create(lv_scr_act());
|
2021-03-31 19:57:14 +02:00
|
|
|
lv_obj_add_style(obj3, &style_shadow, 0);
|
2021-03-25 16:14:17 +01:00
|
|
|
lv_obj_align(obj3, LV_ALIGN_CENTER, 60, 30);
|
2021-02-14 14:56:34 +01:00
|
|
|
}
|
|
|
|
#endif
|