fix conflicts

This commit is contained in:
Gabor Kiss-Vamosi
2019-04-08 14:40:41 +02:00
4 changed files with 19 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
/**
* @file lv_indev_proc.c
* @file lv_indev.c
*
*/
@@ -402,13 +402,20 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data)
/*Simulate a press on the object if ENTER was pressed*/
if(data->key == LV_KEY_ENTER) {
/*Send the ENTER as a normal KEY*/
lv_group_send_data(g, LV_KEY_ENTER);
focused->signal_cb(focused, LV_SIGNAL_PRESSED, NULL);
if(i->proc.reset_query) return; /*The object might be deleted*/
lv_event_send(focused, LV_EVENT_PRESSED, NULL);
if(i->proc.reset_query) return; /*The object might be deleted*/
if(i->proc.reset_query) return; /*The object might be deleted*/
}
else if(data->key == LV_KEY_ESC) {
/*Send the ESC as a normal KEY*/
lv_group_send_data(g, LV_KEY_ESC);
/*Send the ENTER as a normal KEY*/
lv_group_send_data(g, LV_KEY_ENTER);
lv_event_send(focused, LV_EVENT_CANCEL, NULL);
if(i->proc.reset_query) return; /*The object might be deleted*/
}
/*Move the focus on NEXT*/
else if(data->key == LV_KEY_NEXT) {
@@ -424,7 +431,7 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data)
lv_group_focus_prev(g);
if(i->proc.reset_query) return; /*The object might be deleted*/
}
/*Just send other keys to the object (e.g. 'A' or `LV_GORUP_KEY_RIGHT)*/
/*Just send other keys to the object (e.g. 'A' or `LV_GROUP_KEY_RIGHT`)*/
else {
lv_group_send_data(g, data->key);
}

View File

@@ -1,5 +1,5 @@
/**
* @file lv_indev_proc.h
* @file lv_indev.h
*
*/

View File

@@ -120,6 +120,7 @@ lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header)
res = lv_fs_open(&file, src, LV_FS_MODE_RD);
if(res == LV_FS_RES_OK) {
res = lv_fs_read(&file, header, sizeof(lv_img_header_t), &rn);
lv_fs_close(&file);
}
/*Create a dummy header on fs error*/
@@ -127,9 +128,8 @@ lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header)
header->w = LV_DPI;
header->h = LV_DPI;
header->cf = LV_IMG_CF_UNKNOWN;
return LV_RES_INV;
}
lv_fs_close(&file);
}
#endif
else if(src_type == LV_IMG_SRC_SYMBOL) {
@@ -142,9 +142,9 @@ lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header)
header->cf = LV_IMG_CF_ALPHA_1BIT;
} else {
LV_LOG_WARN("Image get info found unknown src type");
return false;
return LV_RES_INV;
}
return true;
return LV_RES_OK;
}
/**

View File

@@ -706,7 +706,7 @@ static void draw_day_names(lv_obj_t * calendar, const lv_area_t * mask)
uint32_t i;
for(i = 0; i < 7; i++) {
label_area.x1 = calendar->coords.x1 + (w * i) / 7 + l_pad;
label_area.x2 = label_area.x1 + box_w;
label_area.x2 = label_area.x1 + box_w - 1;
lv_draw_label(&label_area, mask, ext->style_day_names, opa_scale, get_day_name(calendar, i),
LV_TXT_FLAG_CENTER, NULL, -1, -1);
}
@@ -805,7 +805,7 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask)
label_area.x1 = calendar->coords.x1 + (w * day) / 7 + style_bg->body.padding.left +
style_bg->body.padding.right;
label_area.x2 = label_area.x1 + box_w;
label_area.x2 = label_area.x1 + box_w - 1;
/*Draw the "today box"*/
if(draw_state == DAY_DRAW_ACT_MONTH && month_of_today_shown &&