Update lvgl to v8.4.0

This commit is contained in:
lewisxhe
2024-09-13 11:35:47 +08:00
parent 1a57bfcf2b
commit f285d52d61
641 changed files with 25425 additions and 30726 deletions
+7
View File
@@ -89,3 +89,10 @@ Extending the current theme
:language: c
Opacity and Transformations
""""""""""""""""""""""""""""""""""
.. lv_example:: styles/lv_example_style_15
:language: c
@@ -39,6 +39,7 @@ void lv_example_style_11(void);
void lv_example_style_12(void);
void lv_example_style_13(void);
void lv_example_style_14(void);
void lv_example_style_15(void);
/**********************
* MACROS
@@ -1,7 +1,6 @@
#include "../lv_examples.h"
#if LV_BUILD_EXAMPLES && LV_USE_IMG
static lv_style_t style_btn;
/*Will be called when the styles of the base theme are already added
@@ -36,8 +35,6 @@ static void new_theme_init_and_set(void)
lv_disp_set_theme(NULL, &th_new);
}
/**
* Extending the current theme
*/
@@ -0,0 +1,48 @@
#include "../lv_examples.h"
#if LV_BUILD_EXAMPLES && LV_USE_BTN && LV_USE_LABEL
/**
* Opacity and Transformations
*/
void lv_example_style_15(void)
{
lv_obj_t * btn;
lv_obj_t * label;
/*Normal button*/
btn = lv_btn_create(lv_scr_act());
lv_obj_set_size(btn, 100, 40);
lv_obj_align(btn, LV_ALIGN_CENTER, 0, -70);
label = lv_label_create(btn);
lv_label_set_text(label, "Normal");
lv_obj_center(label);
/*Set opacity
*The button and the label is rendered to a layer first and that layer is blended*/
btn = lv_btn_create(lv_scr_act());
lv_obj_set_size(btn, 100, 40);
lv_obj_set_style_opa(btn, LV_OPA_50, 0);
lv_obj_align(btn, LV_ALIGN_CENTER, 0, 0);
label = lv_label_create(btn);
lv_label_set_text(label, "Opa:50%");
lv_obj_center(label);
/*Set transformations
*The button and the label is rendered to a layer first and that layer is transformed*/
btn = lv_btn_create(lv_scr_act());
lv_obj_set_size(btn, 100, 40);
lv_obj_set_style_transform_angle(btn, 150, 0); /*15 deg*/
lv_obj_set_style_transform_zoom(btn, 256 + 64, 0); /*1.25x*/
lv_obj_set_style_transform_pivot_x(btn, 50, 0);
lv_obj_set_style_transform_pivot_y(btn, 20, 0);
lv_obj_set_style_opa(btn, LV_OPA_50, 0);
lv_obj_align(btn, LV_ALIGN_CENTER, 0, 70);
label = lv_label_create(btn);
lv_label_set_text(label, "Transf.");
lv_obj_center(label);
}
#endif