fix conflicts
This commit is contained in:
@@ -85,7 +85,7 @@ void lv_label_set_text(lv_obj_t * obj, const char * text)
|
||||
|
||||
lv_obj_invalidate(obj);
|
||||
|
||||
/*If text is NULL then just refresh with the current text */
|
||||
/*If text is NULL then just refresh with the current text*/
|
||||
if(text == NULL) text = label->text;
|
||||
|
||||
if(label->text == text && label->static_txt == 0) {
|
||||
@@ -148,7 +148,7 @@ void lv_label_set_text_fmt(lv_obj_t * obj, const char * fmt, ...)
|
||||
lv_obj_invalidate(obj);
|
||||
lv_label_t * label = (lv_label_t *)obj;
|
||||
|
||||
/*If text is NULL then refresh */
|
||||
/*If text is NULL then refresh*/
|
||||
if(fmt == NULL) {
|
||||
lv_label_refr_text(obj);
|
||||
return;
|
||||
@@ -323,7 +323,7 @@ void lv_label_get_letter_pos(const lv_obj_t * obj, uint32_t char_id, lv_point_t
|
||||
|
||||
uint32_t byte_id = _lv_txt_encoded_get_byte_id(txt, char_id);
|
||||
|
||||
/*Search the line of the index letter */;
|
||||
/*Search the line of the index letter*/;
|
||||
while(txt[new_line_start] != '\0') {
|
||||
new_line_start += _lv_txt_get_next_line(&txt[line_start], font, letter_space, max_w, flag);
|
||||
if(byte_id < new_line_start || txt[new_line_start] == '\0')
|
||||
@@ -421,13 +421,13 @@ uint32_t lv_label_get_letter_on(const lv_obj_t * obj, lv_point_t * pos_in)
|
||||
|
||||
lv_text_align_t align = lv_obj_get_style_text_align(obj, LV_PART_MAIN);
|
||||
|
||||
/*Search the line of the index letter */;
|
||||
/*Search the line of the index letter*/;
|
||||
while(txt[line_start] != '\0') {
|
||||
new_line_start += _lv_txt_get_next_line(&txt[line_start], font, letter_space, max_w, flag);
|
||||
|
||||
if(pos.y <= y + letter_height) {
|
||||
/*The line is found (stored in 'line_start')*/
|
||||
/* Include the NULL terminator in the last line */
|
||||
/*Include the NULL terminator in the last line*/
|
||||
uint32_t tmp = new_line_start;
|
||||
uint32_t letter;
|
||||
letter = _lv_txt_encoded_prev(txt, &tmp);
|
||||
@@ -468,7 +468,7 @@ uint32_t lv_label_get_letter_on(const lv_obj_t * obj, lv_point_t * pos_in)
|
||||
|
||||
if(new_line_start > 0) {
|
||||
while(i + line_start < new_line_start) {
|
||||
/* Get the current letter.*/
|
||||
/*Get the current letter.*/
|
||||
uint32_t letter = _lv_txt_encoded_next(bidi_txt, &i);
|
||||
|
||||
/*Get the next letter too for kerning*/
|
||||
@@ -538,7 +538,7 @@ bool lv_label_is_char_under_pos(const lv_obj_t * obj, lv_point_t * pos)
|
||||
if(label->expand != 0) flag |= LV_TEXT_FLAG_EXPAND;
|
||||
if(label->long_mode == LV_LABEL_LONG_EXPAND) flag |= LV_TEXT_FLAG_FIT;
|
||||
|
||||
/*Search the line of the index letter */;
|
||||
/*Search the line of the index letter*/;
|
||||
while(txt[line_start] != '\0') {
|
||||
new_line_start += _lv_txt_get_next_line(&txt[line_start], font, letter_space, max_w, flag);
|
||||
|
||||
@@ -571,8 +571,8 @@ bool lv_label_is_char_under_pos(const lv_obj_t * obj, lv_point_t * pos)
|
||||
|
||||
if(new_line_start > 0) {
|
||||
while(i <= new_line_start - 1) {
|
||||
/* Get the current letter
|
||||
* Be careful 'i' already points to the next character */
|
||||
/*Get the current letter
|
||||
*Be careful 'i' already points to the next character*/
|
||||
letter = _lv_txt_encoded_next(txt, &i);
|
||||
|
||||
/*Get the next letter for kerning*/
|
||||
@@ -741,7 +741,7 @@ static void lv_label_event_cb(lv_obj_t * obj, lv_event_t e)
|
||||
{
|
||||
lv_res_t res;
|
||||
|
||||
/* Include the ancient signal function */
|
||||
/*Include the ancient signal function*/
|
||||
res = lv_obj_event_base(MY_CLASS, obj, e);
|
||||
if(res != LV_RES_OK) return;
|
||||
|
||||
@@ -1156,10 +1156,10 @@ static bool lv_label_set_dot_tmp(lv_obj_t * obj, char * data, uint32_t len)
|
||||
{
|
||||
|
||||
lv_label_t * label = (lv_label_t *)obj;
|
||||
lv_label_dot_tmp_free(obj); /* Deallocate any existing space */
|
||||
lv_label_dot_tmp_free(obj); /*Deallocate any existing space*/
|
||||
if(len > sizeof(char *)) {
|
||||
/* Memory needs to be allocated. Allocates an additional byte
|
||||
* for a NULL-terminator so it can be copied. */
|
||||
/*Memory needs to be allocated. Allocates an additional byte
|
||||
*for a NULL-terminator so it can be copied.*/
|
||||
label->dot.tmp_ptr = lv_mem_alloc(len + 1);
|
||||
if(label->dot.tmp_ptr == NULL) {
|
||||
LV_LOG_ERROR("Failed to allocate memory for dot_tmp_ptr");
|
||||
@@ -1170,7 +1170,7 @@ static bool lv_label_set_dot_tmp(lv_obj_t * obj, char * data, uint32_t len)
|
||||
label->dot_tmp_alloc = true;
|
||||
}
|
||||
else {
|
||||
/* Characters can be directly stored in object */
|
||||
/*Characters can be directly stored in object*/
|
||||
label->dot_tmp_alloc = false;
|
||||
lv_memcpy(label->dot.tmp, data, len);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user