refacter(conf): use defines for standard includes (#5767)

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
Co-authored-by: Neo Xu <neo.xu1990@gmail.com>
This commit is contained in:
Michael Simon
2024-03-20 05:10:33 +01:00
committed by GitHub
parent 393c24c6e9
commit 352420cd54
100 changed files with 210 additions and 167 deletions

View File

@@ -20,7 +20,9 @@ extern "C" {
* DEFINES
*********************/
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
#endif
/**********************
* TYPEDEFS

View File

@@ -203,7 +203,7 @@ static void ta_event_cb(lv_event_t * e)
lv_keyboard_set_textarea(kb, ta);
lv_obj_remove_flag(kb, LV_OBJ_FLAG_HIDDEN);
lv_group_focus_obj(kb);
lv_group_set_editing(lv_obj_get_group(kb), kb);
lv_group_set_editing(lv_obj_get_group(kb), kb != NULL);
lv_obj_set_height(tv, LV_VER_RES / 2);
lv_obj_align(kb, LV_ALIGN_BOTTOM_MID, 0, 0);
}

View File

@@ -12,7 +12,7 @@
#include "lvgl/lvgl.h"
#endif
#if LV_USE_DEMO_MULTILANG
#if defined(LV_USE_DEMO_MULTILANG) || defined(LV_USE_DEMO_TRANSFORM)
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN