Merge branch 'master' into dev-6.0
This commit is contained in:
@@ -78,6 +78,14 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st
|
||||
pos.x = coords->x1;
|
||||
pos.y = coords->y1;
|
||||
|
||||
lv_coord_t x_ofs = 0;
|
||||
lv_coord_t y_ofs = 0;
|
||||
if(offset != NULL) {
|
||||
x_ofs = offset->x;
|
||||
y_ofs = offset->y;
|
||||
pos.y += y_ofs;
|
||||
}
|
||||
|
||||
uint32_t line_start = 0;
|
||||
uint32_t line_end = lv_txt_get_next_line(txt, font, style->text.letter_space, w, flag);
|
||||
|
||||
@@ -115,14 +123,6 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st
|
||||
lv_color_t recolor;
|
||||
lv_coord_t letter_w;
|
||||
|
||||
lv_coord_t x_ofs = 0;
|
||||
lv_coord_t y_ofs = 0;
|
||||
if(offset != NULL) {
|
||||
x_ofs = offset->x;
|
||||
y_ofs = offset->y;
|
||||
pos.y += y_ofs;
|
||||
}
|
||||
|
||||
/*Real draw need a background color for higher bpp letter*/
|
||||
#if LV_VDB_SIZE == 0
|
||||
lv_rletter_set_background(style->body.main_color);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
*********************/
|
||||
#include "lv_math.h"
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
|
||||
@@ -175,9 +175,10 @@ void lv_chart_clear_serie(lv_obj_t * chart, lv_chart_series_t * serie)
|
||||
if(chart == NULL || serie == NULL)
|
||||
return;
|
||||
lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
|
||||
if(ext == NULL)
|
||||
return;
|
||||
for(uint32_t i = 0; i < ext->point_cnt; i++)
|
||||
if(ext == NULL) return;
|
||||
|
||||
uint32_t i;
|
||||
for(i = 0; i < ext->point_cnt; i++)
|
||||
{
|
||||
serie->points[i] = LV_CHART_POINT_DEF;
|
||||
}
|
||||
|
||||
@@ -624,6 +624,7 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par
|
||||
} else if(sign == LV_SIGNAL_CLEANUP) {
|
||||
ext->label = NULL;
|
||||
} else if(sign == LV_SIGNAL_FOCUS) {
|
||||
#if USE_LV_GROUP
|
||||
lv_group_t * g = lv_obj_get_group(ddlist);
|
||||
bool editing = lv_group_get_editing(g);
|
||||
lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act());
|
||||
@@ -651,6 +652,7 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par
|
||||
lv_ddlist_refr_size(ddlist, true);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} else if(sign == LV_SIGNAL_DEFOCUS) {
|
||||
if(ext->opened) {
|
||||
ext->opened = false;
|
||||
@@ -686,9 +688,11 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par
|
||||
ext->opened = 0;
|
||||
if(ext->action) ext->action(ddlist);
|
||||
|
||||
#if USE_LV_GROUP
|
||||
lv_group_t * g = lv_obj_get_group(ddlist);
|
||||
bool editing = lv_group_get_editing(g);
|
||||
if(editing) lv_group_set_editing(g, false); /*In edit mode go to navigate mode if an option is selected*/
|
||||
#endif
|
||||
} else {
|
||||
ext->opened = 1;
|
||||
}
|
||||
|
||||
@@ -385,7 +385,7 @@ static void refr_img(lv_obj_t * imgbtn)
|
||||
ext->act_cf = LV_IMG_CF_UNKOWN;
|
||||
}
|
||||
|
||||
|
||||
lv_obj_invalidate(imgbtn);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -361,6 +361,7 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par
|
||||
refr_position(roller, false);
|
||||
}
|
||||
} else if(sign == LV_SIGNAL_FOCUS) {
|
||||
#if USE_LV_GROUP
|
||||
lv_group_t * g = lv_obj_get_group(roller);
|
||||
bool editing = lv_group_get_editing(g);
|
||||
lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act());
|
||||
@@ -382,12 +383,15 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par
|
||||
ext->ddlist.sel_opt_id_ori = ext->ddlist.sel_opt_id; /*Save the current value. Used to revert this state if ENER wont't be pressed*/
|
||||
|
||||
}
|
||||
#endif
|
||||
} else if(sign == LV_SIGNAL_DEFOCUS) {
|
||||
#if USE_LV_GROUP
|
||||
/*Revert the original state*/
|
||||
if(ext->ddlist.sel_opt_id != ext->ddlist.sel_opt_id_ori) {
|
||||
ext->ddlist.sel_opt_id = ext->ddlist.sel_opt_id_ori;
|
||||
refr_position(roller, true);
|
||||
}
|
||||
#endif
|
||||
} else if(sign == LV_SIGNAL_CONTROLL) {
|
||||
char c = *((char *)param);
|
||||
if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_DOWN) {
|
||||
@@ -402,9 +406,11 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par
|
||||
ext->ddlist.sel_opt_id_ori = ext->ddlist.sel_opt_id; /*Set the entered value as default*/
|
||||
if(ext->ddlist.action) ext->ddlist.action(roller);
|
||||
|
||||
#if USE_LV_GROUP
|
||||
lv_group_t * g = lv_obj_get_group(roller);
|
||||
bool editing = lv_group_get_editing(g);
|
||||
if(editing) lv_group_set_editing(g, false); /*In edit mode go to navigate mode if an option is selected*/
|
||||
#endif
|
||||
}
|
||||
} else if(sign == LV_SIGNAL_GET_TYPE) {
|
||||
lv_obj_type_t * buf = param;
|
||||
|
||||
@@ -621,12 +621,14 @@ static lv_res_t lv_tabview_signal(lv_obj_t * tabview, lv_signal_t sign, void * p
|
||||
lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act());
|
||||
/*With ENCODER select the first button only in edit mode*/
|
||||
if(indev_type == LV_INDEV_TYPE_ENCODER) {
|
||||
#if USE_LV_GROUP
|
||||
lv_group_t * g = lv_obj_get_group(tabview);
|
||||
if(lv_group_get_editing(g)) {
|
||||
lv_btnm_ext_t * btnm_ext = lv_obj_get_ext_attr(ext->btns);
|
||||
btnm_ext->btn_id_pr = 0;
|
||||
lv_obj_invalidate(ext->btns);
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
lv_btnm_ext_t * btnm_ext = lv_obj_get_ext_attr(ext->btns);
|
||||
btnm_ext->btn_id_pr = 0;
|
||||
|
||||
Reference in New Issue
Block a user