diff --git a/lv_objx/lv_roller.c b/lv_objx/lv_roller.c index 7747699d1..53c5458cc 100644 --- a/lv_objx/lv_roller.c +++ b/lv_objx/lv_roller.c @@ -234,7 +234,7 @@ static bool roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, void * cord_t label_y1 = ext->ddlist.opt_label->cords.y1 - roller->cords.y1; cord_t label_unit = (font_get_height(style_label->font) >> FONT_ANTIALIAS) + style_label->line_space / 2; cord_t mid = (roller->cords.y2 - roller->cords.y1) / 2; - id = (mid - label_y1) / label_unit;if(id < 0) id = 0; + id = (mid - label_y1) / label_unit; if(id < 0) id = 0; if(id >= ext->ddlist.num_opt) id = ext->ddlist.num_opt - 1; ext->ddlist.sel_opt = id; diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index 0fae18055..16c3bd785 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -814,7 +814,11 @@ static bool lv_ta_design(lv_obj_t * ta, const area_t * masp, lv_design_mode_t mo /** * An extended scrollable design of the page. Calls the normal design function and draws a cursor. +<<<<<<< HEAD * @param scrl pointer to the scrollable part of the Text area +======= + * @param scrl pointer to the scrollabla part of the Text area +>>>>>>> fc3b967f33a3af469bd1edbfdfa42d516dc58d20 * @param mask the object will be drawn only in this area * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area * (return 'true' if yes) @@ -881,7 +885,7 @@ static bool lv_ta_scrling_design(lv_obj_t * scrl, const area_t * mask, lv_design } point_t letter_pos; - lv_label_get_letter_pos(ta_ext->label, cur_pos, &letter_pos); + lv_label_get_letter_pos(ta_ext->label, byte_pos, &letter_pos); /*If the cursor is out of the text (most right) draw it to the next line*/ if(letter_pos.x + ta_ext->label->cords.x1 + letter_w > ta_ext->label->cords.x2 && ta_ext->one_line == 0) {