Merge branch 'master' into dev-6.1

This commit is contained in:
Gabor Kiss-Vamosi
2019-07-22 06:30:26 +02:00
7 changed files with 426 additions and 142 deletions

View File

@@ -1106,20 +1106,12 @@ static void indev_drag(lv_indev_proc_t * state)
lv_obj_set_y(drag_obj, act_y + state->types.pointer.vect.y);
}
/*Set the drag in progress flag*/
/*Send the drag begin signal on first move*/
if(state->types.pointer.drag_in_prog == 0) {
drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_BEGIN, indev_act);
if(indev_reset_check(state)) return;
lv_event_send(drag_obj, LV_EVENT_DRAG_BEGIN, NULL);
if(indev_reset_check(state)) return;
}
state->types.pointer.drag_in_prog = 1;
/*If the object didn't moved then clear the invalidated areas*/
if(drag_obj->coords.x1 == prev_x && drag_obj->coords.y1 == prev_y) {
state->types.pointer.drag_in_prog = 0;
// state->types.pointer.drag_in_prog = 0;
/*In a special case if the object is moved on a page and
* the scrollable has fit == true and the object is dragged of the page then
* while its coordinate is not changing only the parent's size is reduced */
@@ -1129,6 +1121,16 @@ static void indev_drag(lv_indev_proc_t * state)
uint16_t new_inv_buf_size = lv_disp_get_inv_buf_size(indev_act->driver.disp);
lv_disp_pop_from_inv_buf(indev_act->driver.disp, new_inv_buf_size - inv_buf_size);
}
} else {
state->types.pointer.drag_in_prog = 1;
/*Set the drag in progress flag*/
/*Send the drag begin signal on first move*/
if(drag_just_started) {
drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_BEGIN, indev_act);
if(indev_reset_check(state)) return;
lv_event_send(drag_obj, LV_EVENT_DRAG_BEGIN, NULL);
if(indev_reset_check(state)) return;
}
}
}
}

View File

@@ -115,7 +115,7 @@ void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p)
/*The area is truncated to the screen*/
if(suc != false) {
if(disp->driver.rounder_cb) disp->driver.rounder_cb(&disp_refr->driver, &com_area);
if(disp->driver.rounder_cb) disp->driver.rounder_cb(&disp->driver, &com_area);
/*Save only if this area is not in one of the saved areas*/
uint16_t i;

View File

@@ -464,7 +464,7 @@ lv_obj_t * lv_list_get_btn_img(const lv_obj_t * btn)
}
/**
* Get the previous button from list. (Starts from the top button)
* Get the previous button from list. (Starts from the bottom button)
* @param list pointer to a list object
* @param prev_btn pointer to button. Search the previous before it.
* @return pointer to the previous button or NULL when no more buttons
@@ -489,7 +489,7 @@ lv_obj_t * lv_list_get_prev_btn(const lv_obj_t * list, lv_obj_t * prev_btn)
}
/**
* Get the next button from list. (Starts from the bottom button)
* Get the next button from list. (Starts from the top button)
* @param list pointer to a list object
* @param prev_btn pointer to button. Search the next after it.
* @return pointer to the next button or NULL when no more buttons

View File

@@ -1081,7 +1081,8 @@ static void scrl_def_event_cb(lv_obj_t * scrl, lv_event_t event)
/*clang-format off*/
if(event == LV_EVENT_PRESSED || event == LV_EVENT_PRESSING || event == LV_EVENT_PRESS_LOST ||
event == LV_EVENT_RELEASED || event == LV_EVENT_SHORT_CLICKED || event == LV_EVENT_CLICKED ||
event == LV_EVENT_LONG_PRESSED || event == LV_EVENT_LONG_PRESSED_REPEAT) {
event == LV_EVENT_LONG_PRESSED || event == LV_EVENT_LONG_PRESSED_REPEAT ||
event == LV_EVENT_DRAG_BEGIN || event == LV_EVENT_DRAG_END || event == LV_EVENT_DRAG_THROW_BEGIN) {
lv_event_send(page, event, lv_event_get_data());
}
/*clang-format on*/