1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

Merge branch 'master' into dev

This commit is contained in:
Gabor Kiss-Vamosi 2021-02-16 15:25:31 +01:00
commit 351008edcc
7 changed files with 25 additions and 17 deletions

View File

@ -1,4 +1,4 @@
# Kconfig file for LVGL v7.8.1
# Kconfig file for LVGL v7.10.1
menu "LVGL configuration"

View File

@ -168,8 +168,8 @@ void _lv_txt_ap_proc(const char * txt, char * txt_out)
idx_next == LV_UNDEF_ARABIC_PERSIAN_CHARS) ? 0 : ap_chars_map[idx_next].ap_chars_conjunction.conj_to_previous;
uint32_t lam_alef = lv_txt_lam_alef(index_current, idx_next);
if ( lam_alef ) {
if (conjunction_to_previuse) {
if(lam_alef) {
if(conjunction_to_previuse) {
lam_alef ++;
}
ch_fin[j] = lam_alef;
@ -192,12 +192,12 @@ void _lv_txt_ap_proc(const char * txt, char * txt_out)
j++;
}
ch_fin[j] = 0;
for (i=0; i<txt_length; i++)
for(i = 0; i < txt_length; i++)
ch_enc[i] = 0;
for (i=0; i<j; i++)
for(i = 0; i < j; i++)
ch_enc[i] = ch_fin[i];
lv_mem_free(ch_fin);
txt_out_temp = txt_out;
i = 0;
@ -248,17 +248,25 @@ static uint32_t lv_ap_get_char_index(uint16_t c)
static uint32_t lv_txt_lam_alef(uint32_t ch_curr, uint32_t ch_next)
{
uint32_t ch_code = 0;
if (ap_chars_map[ch_curr].char_offset != 34) {
if(ap_chars_map[ch_curr].char_offset != 34) {
return 0;
}
if (ch_next == LV_UNDEF_ARABIC_PERSIAN_CHARS) {
if(ch_next == LV_UNDEF_ARABIC_PERSIAN_CHARS) {
return 0;
}
ch_code = ap_chars_map[ch_next].char_offset + LV_AP_ALPHABET_BASE_CODE;
if (ch_code == 0x0622) { return 0xFEF5; } // (lam-alef) mad
if (ch_code == 0x0623) { return 0xFEF7; } // (lam-alef) top hamza
if (ch_code == 0x0625) { return 0xFEF9; } // (lam-alef) bot hamza
if (ch_code == 0x0627) { return 0xFEFB; } // (lam-alef) alef
if(ch_code == 0x0622) {
return 0xFEF5; // (lam-alef) mad
}
if(ch_code == 0x0623) {
return 0xFEF7; // (lam-alef) top hamza
}
if(ch_code == 0x0625) {
return 0xFEF9; // (lam-alef) bot hamza
}
if(ch_code == 0x0627) {
return 0xFEFB; // (lam-alef) alef
}
return 0;
}

View File

@ -66,7 +66,7 @@ lv_theme_t * lv_theme_empty_init(lv_color_t color_primary, lv_color_t color_seco
* In a general case styles could be simple `static lv_style_t my style` variables*/
if(styles == NULL) {
styles = lv_mem_alloc(sizeof(theme_styles_t));
if (styles == NULL) return NULL;
if(styles == NULL) return NULL;
_lv_memset_00(styles, sizeof(theme_styles_t));
LV_GC_ROOT(_lv_theme_empty_styles) = styles;
}

View File

@ -893,7 +893,7 @@ lv_theme_t * lv_theme_material_init(lv_color_t color_primary, lv_color_t color_s
* In a general case styles could be simple `static lv_style_t my style` variables*/
if(styles == NULL) {
styles = lv_mem_alloc(sizeof(theme_styles_t));
if (styles == NULL) return NULL;
if(styles == NULL) return NULL;
_lv_memset_00(styles, sizeof(theme_styles_t));
LV_GC_ROOT(_lv_theme_material_styles) = styles;
}

View File

@ -499,7 +499,7 @@ lv_theme_t * lv_theme_mono_init(lv_color_t color_primary, lv_color_t color_secon
* In a general case styles could be simple `static lv_style_t my style` variables*/
if(styles == NULL) {
styles = lv_mem_alloc(sizeof(theme_styles_t));
if (styles == NULL) return NULL;
if(styles == NULL) return NULL;
_lv_memset_00(styles, sizeof(theme_styles_t));
LV_GC_ROOT(_lv_theme_mono_styles) = styles;
}

View File

@ -336,7 +336,7 @@ lv_theme_t * lv_theme_template_init(lv_color_t color_primary, lv_color_t color_s
* In a general case styles could be simple `static lv_style_t my style` variables or allocated directly into `styles`*/
if(styles == NULL) {
styles = lv_mem_alloc(sizeof(theme_styles_t));
if (styles == NULL) return NULL;
if(styles == NULL) return NULL;
_lv_memset_00(styles, sizeof(theme_styles_t));
LV_GC_ROOT(_lv_theme_template_styles) = styles;
}

View File

@ -112,7 +112,7 @@ static inline void lv_gauge_set_range(lv_obj_t * gauge, int32_t min, int32_t max
*/
static inline void lv_gauge_set_critical_value(lv_obj_t * gauge, int32_t value)
{
lv_linemeter_set_value(gauge, value-1);
lv_linemeter_set_value(gauge, value - 1);
}
/**