api(style) add lv_style_selector_t instead of lv_part_t and lv_state_t in style API

This commit is contained in:
Gabor Kiss-Vamosi
2021-03-31 19:57:14 +02:00
parent 0527874f8d
commit 663bcfd030
63 changed files with 763 additions and 734 deletions

View File

@@ -12,7 +12,7 @@ void lv_example_label_1(void)
lv_label_set_text(label1, "#0000ff Re-color# #ff00ff words# #ff0000 of a# label, align the lines to the center"
"and wrap long text automatically.");
lv_obj_set_width(label1, 150); /*Set smaller width to make the lines wrap*/
lv_obj_set_style_text_align(label1, LV_PART_MAIN, LV_STATE_DEFAULT, LV_TEXT_ALIGN_CENTER);
lv_obj_set_style_text_align(label1, LV_TEXT_ALIGN_CENTER, 0);
lv_obj_align(label1, LV_ALIGN_CENTER, 0, -40);

View File

@@ -14,7 +14,7 @@ void lv_example_label_2(void)
/*Create a label for the shadow first (it's in the background)*/
lv_obj_t * shadow_label = lv_label_create(lv_scr_act());
lv_obj_add_style(shadow_label, LV_PART_MAIN, LV_STATE_DEFAULT, &style_shadow);
lv_obj_add_style(shadow_label, &style_shadow, 0);
/*Create the main label*/
lv_obj_t * main_label = lv_label_create(lv_scr_act());