mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
fix conflicts
This commit is contained in:
commit
427d11e7f5
@ -1027,6 +1027,7 @@ static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj)
|
||||
static void indev_drag(lv_indev_proc_t * state)
|
||||
{
|
||||
lv_obj_t * drag_obj = state->types.pointer.act_obj;
|
||||
bool drag_just_started = false;
|
||||
|
||||
/*If drag parent is active check recursively the drag_parent attribute*/
|
||||
while(lv_obj_get_drag_parent(drag_obj) != false && drag_obj != NULL) {
|
||||
@ -1051,6 +1052,7 @@ static void indev_drag(lv_indev_proc_t * state)
|
||||
((allowed_dirs & LV_DRAG_DIR_VER) &&
|
||||
LV_MATH_ABS(state->types.pointer.drag_sum.y) >= indev_act->driver.drag_limit)) {
|
||||
state->types.pointer.drag_limit_out = 1;
|
||||
drag_just_started = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1071,13 +1073,23 @@ static void indev_drag(lv_indev_proc_t * state)
|
||||
lv_coord_t act_x = lv_obj_get_x(drag_obj);
|
||||
lv_coord_t act_y = lv_obj_get_y(drag_obj);
|
||||
|
||||
if(allowed_dirs == LV_DRAG_DIR_ALL)
|
||||
lv_obj_set_pos(drag_obj, act_x + state->types.pointer.vect.x,
|
||||
act_y + state->types.pointer.vect.y);
|
||||
else if(allowed_dirs & LV_DRAG_DIR_HOR)
|
||||
if(allowed_dirs == LV_DRAG_DIR_ALL) {
|
||||
if(drag_just_started) {
|
||||
act_x += state->types.pointer.drag_sum.x;
|
||||
act_y += state->types.pointer.drag_sum.y;
|
||||
}
|
||||
lv_obj_set_pos(drag_obj, act_x + state->types.pointer.vect.x, act_y + state->types.pointer.vect.y);
|
||||
} else if(allowed_dirs & LV_DRAG_DIR_HOR) {
|
||||
if(drag_just_started) {
|
||||
act_x += state->types.pointer.drag_sum.x;
|
||||
}
|
||||
lv_obj_set_x(drag_obj, act_x + state->types.pointer.vect.x);
|
||||
else if(allowed_dirs & LV_DRAG_DIR_VER)
|
||||
} else if(allowed_dirs & LV_DRAG_DIR_VER) {
|
||||
if(drag_just_started) {
|
||||
act_y += state->types.pointer.drag_sum.y;
|
||||
}
|
||||
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*/
|
||||
|
@ -99,10 +99,8 @@ void lv_init(void)
|
||||
lv_ll_init(&LV_GC_ROOT(_lv_disp_ll), sizeof(lv_disp_t));
|
||||
lv_ll_init(&LV_GC_ROOT(_lv_indev_ll), sizeof(lv_indev_t));
|
||||
|
||||
#if LV_INDEV_READ_PERIOD != 0
|
||||
/*Init the input device handling*/
|
||||
lv_indev_init();
|
||||
#endif
|
||||
|
||||
lv_initialized = true;
|
||||
LV_LOG_INFO("lv_init ready");
|
||||
|
@ -436,8 +436,8 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_
|
||||
#if LV_ANTIALIAS
|
||||
|
||||
/*Shift the anti aliasing on the edges (-1, 1 or 0 (zero only in case width == 0))*/
|
||||
lv_coord_t aa_shift1;
|
||||
lv_coord_t aa_shift2;
|
||||
lv_coord_t aa_shift1 = 0;
|
||||
lv_coord_t aa_shift2 = 0;
|
||||
if(aa) {
|
||||
if(main_line->hor == false) {
|
||||
if(main_line->sx < 0) {
|
||||
|
@ -651,10 +651,11 @@ static void refr_position(lv_obj_t * roller, bool anim_en)
|
||||
|
||||
/**
|
||||
* Set the middle page for the roller if inifinte is enabled
|
||||
* @param roller_scrl pointer to the roller's scrollable
|
||||
* @param scrl pointer to the roller's scrollable (lv_obj_t *)
|
||||
*/
|
||||
static void inf_normalize(void * roller_scrl)
|
||||
static void inf_normalize(void * scrl)
|
||||
{
|
||||
lv_obj_t * roller_scrl= (lv_obj_t *)scrl;
|
||||
lv_obj_t * roller = lv_obj_get_parent(roller_scrl);
|
||||
lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller);
|
||||
|
||||
@ -667,8 +668,6 @@ static void inf_normalize(void * roller_scrl)
|
||||
(LV_ROLLER_INF_PAGES / 2) * real_id_cnt; /*Select the middle page*/
|
||||
|
||||
/*Move to the new id*/
|
||||
lv_obj_t * roller_scrl = lv_page_get_scrl(roller);
|
||||
lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller);
|
||||
lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label);
|
||||
const lv_font_t * font = style_label->text.font;
|
||||
lv_coord_t font_h = lv_font_get_height(font);
|
||||
|
Loading…
x
Reference in New Issue
Block a user