1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

merge beta

This commit is contained in:
Gabor Kiss-Vamosi 2018-07-30 06:56:31 +02:00
commit c2712963d6
6 changed files with 22 additions and 16 deletions

View File

@ -201,7 +201,12 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent,const lv_obj_t * copy)
new_obj->ext_size = 0;
/*Set appearance*/
new_obj->style_p = &lv_style_plain_color;
lv_theme_t * th = lv_theme_get_current();
if(th) {
new_obj->style_p = th->panel;
} else {
new_obj->style_p = &lv_style_plain_color;
}
/*Set virtual functions*/
lv_obj_set_signal_func(new_obj, lv_obj_signal);

View File

@ -145,12 +145,12 @@ void lv_style_init(void)
lv_style_transp.glass = 1;
lv_style_transp.body.border.width = 0;
/*Transparent tight style*/
/*Transparent fitting size*/
memcpy(&lv_style_transp_fit, &lv_style_transp, sizeof(lv_style_t));
lv_style_transp_fit.body.padding.hor = 0;
lv_style_transp_fit.body.padding.ver = 0;
/*Transparent fitting size*/
/*Transparent tight style*/
memcpy(&lv_style_transp_tight, &lv_style_transp_fit, sizeof(lv_style_t));
lv_style_transp_tight.body.padding.inner = 0;

View File

@ -69,7 +69,7 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void)
/* Run all task from the highest to the lowest priority
* If a lower priority task is executed check task again from the highest priority
* but on the priority of executed tasks don't run tasks before the executed*/
lv_task_t * task_interruper = NULL;
lv_task_t * task_interrupter = NULL;
lv_task_t * next;
bool end_flag;
do {
@ -86,8 +86,8 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void)
}
/*Here is the interrupter task. Don't execute it again.*/
if(act == task_interruper) {
task_interruper = NULL; /*From this point only task after the interrupter comes, so the interrupter is not interesting anymore*/
if(act == task_interrupter) {
task_interrupter = NULL; /*From this point only task after the interrupter comes, so the interrupter is not interesting anymore*/
act = next;
continue; /*Load the next task*/
}
@ -97,10 +97,10 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void)
lv_task_exec(act);
}
/*Tasks with higher priority then the interrupted shall be run in every case*/
else if(task_interruper) {
if(act->prio > task_interruper->prio) {
else if(task_interrupter) {
if(act->prio > task_interrupter->prio) {
if(lv_task_exec(act)) {
task_interruper = act; /*Check all tasks again from the highest priority */
task_interrupter = act; /*Check all tasks again from the highest priority */
end_flag = false;
break;
}
@ -110,7 +110,7 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void)
* Just run the remaining tasks*/
else {
if(lv_task_exec(act)) {
task_interruper = act; /*Check all tasks again from the highest priority */
task_interrupter = act; /*Check all tasks again from the highest priority */
end_flag = false;
break;
}

View File

@ -236,8 +236,6 @@ lv_coord_t lv_txt_get_width(const char * txt, uint16_t length,
width += lv_font_get_width(font, letter);
width += letter_space;
}
width -= letter_space; /*Trim the last letter space. Important if the text is center aligned */

View File

@ -52,8 +52,9 @@ typedef struct
/*New data for this type */
uint8_t layout :4; /*A layout from 'lv_cont_layout_t' enum*/
uint8_t hor_fit :1; /*1: Enable horizontal fit to involve all children*/
uint8_t ver_fit :1; /*1: Enable horizontal fir to involve all children*/
} lv_cont_ext_t;
uint8_t ver_fit :1; /*1: Enable horizontal fit to involve all children*/
}lv_cont_ext_t;
/**********************
* GLOBAL PROTOTYPES

View File

@ -512,8 +512,10 @@ uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos)
/*Search the line of the index letter */;
while(txt[line_start] != '\0') {
new_line_start += lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, max_w, flag);
if(pos->y <= y + letter_height) break; /*The line is found (stored in 'line_start')*/
y += letter_height + style->text.line_space;
if(pos->y <= y + letter_height) break; /*The line is found (stored in 'line_start')*/
y += letter_height + style->text.line_space;
line_start = new_line_start;
}