Add #if HASP_USE_QRCODE

This commit is contained in:
fvanroie 2024-04-04 01:31:22 +02:00
parent 9b57bf6feb
commit 9ba255807e

View File

@ -1757,8 +1757,10 @@ static hasp_attribute_type_t attribute_common_text(lv_obj_t* obj, uint16_t attr_
#if LV_USE_WIN != 0
{LV_HASP_WINDOW, ATTR_TEXT, lv_win_set_title, lv_win_get_title},
#endif
{LV_HASP_MSGBOX, ATTR_TEXT, my_msgbox_set_text, lv_msgbox_get_text},
{LV_HASP_QRCODE, ATTR_TEXT, my_qrcode_set_text, my_qrcode_get_text}
#if HASP_USE_QRCODE > 0
{LV_HASP_QRCODE, ATTR_TEXT, my_qrcode_set_text, my_qrcode_get_text},
#endif
{LV_HASP_MSGBOX, ATTR_TEXT, my_msgbox_set_text, lv_msgbox_get_text}
};
for(int i = 0; i < sizeof(list) / sizeof(list[0]); i++) {
@ -2452,6 +2454,7 @@ static hasp_attribute_type_t attribute_common_int(lv_obj_t* obj, uint16_t attr_h
val = lv_obj_get_ext_click_pad_top(obj);
break; // attribute_found
#if HASP_USE_QRCODE > 0
case ATTR_SIZE:
if(obj_check_type(obj, LV_HASP_QRCODE)) {
if(update) {
@ -2461,6 +2464,7 @@ static hasp_attribute_type_t attribute_common_int(lv_obj_t* obj, uint16_t attr_h
}
}
break;
#endif
default:
return HASP_ATTR_TYPE_NOT_FOUND; // attribute_not found