mirror of
https://github.com/lvgl/lvgl.git
synced 2024-11-24 02:03:53 +08:00
minor fixes
This commit is contained in:
parent
bbfcb2454e
commit
8667402524
@ -313,9 +313,7 @@ uint32_t lv_layout_register(lv_layout_update_cb_t cb, void * user_data)
|
||||
LV_ASSERT_MALLOC(LV_GC_ROOT(_lv_layout_list));
|
||||
|
||||
LV_GC_ROOT(_lv_layout_list)[layout_cnt - 1].cb = cb;
|
||||
#if LV_USE_USER_DATA
|
||||
LV_GC_ROOT(_lv_layout_list)[layout_cnt - 1].user_data = user_data;
|
||||
#endif
|
||||
return layout_cnt; /*No -1 to skip 0th index*/
|
||||
}
|
||||
|
||||
|
@ -26,9 +26,7 @@ struct _lv_obj_t;
|
||||
typedef void (*lv_layout_update_cb_t)(struct _lv_obj_t *, void * user_data);
|
||||
typedef struct {
|
||||
lv_layout_update_cb_t cb;
|
||||
#if LV_USE_USER_DATA
|
||||
void * user_data;
|
||||
#endif
|
||||
}lv_layout_dsc_t;
|
||||
|
||||
/**********************
|
||||
|
@ -1165,7 +1165,7 @@ static void update_cursor_position_on_click(lv_event_t * e)
|
||||
}
|
||||
|
||||
if(ta->text_sel_en) {
|
||||
if(!ta->text_sel_in_prog && !click_outside_label && e == LV_EVENT_PRESSED) {
|
||||
if(!ta->text_sel_in_prog && !click_outside_label && code == LV_EVENT_PRESSED) {
|
||||
/*Input device just went down. Store the selection start position*/
|
||||
ta->sel_start = char_id_at_click;
|
||||
ta->sel_end = LV_LABEL_TEXT_SEL_OFF;
|
||||
@ -1182,7 +1182,7 @@ static void update_cursor_position_on_click(lv_event_t * e)
|
||||
}
|
||||
}
|
||||
|
||||
if(ta->text_sel_in_prog || e == LV_EVENT_PRESSED) lv_textarea_set_cursor_pos(obj, char_id_at_click);
|
||||
if(ta->text_sel_in_prog || code == LV_EVENT_PRESSED) lv_textarea_set_cursor_pos(obj, char_id_at_click);
|
||||
|
||||
if(ta->text_sel_in_prog) {
|
||||
/*If the selected area has changed then update the real values and*/
|
||||
|
@ -197,6 +197,7 @@ full_32bit = {
|
||||
"LV_USE_PERF_MONITOR":1,
|
||||
"LV_USE_MEM_MONITOR":1,
|
||||
|
||||
"LV_LABEL_TEXT_SEL":1,
|
||||
|
||||
"LV_BUILD_EXAMPLES":1,
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user