Fix text decor (udnerline strikethrough) with older versions of font converter

This commit is contained in:
Gabor Kiss-Vamosi
2020-08-06 14:48:23 +02:00
parent 7af20516a5
commit cda21694c4
3 changed files with 3 additions and 3 deletions

View File

@@ -214,11 +214,10 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_label(const lv_area_t * coords, const lv_area
sel_end = tmp;
}
lv_draw_line_dsc_t line_dsc;
dsc->decor = LV_TEXT_DECOR_UNDERLINE;
if((dsc->decor & LV_TEXT_DECOR_UNDERLINE) || (dsc->decor & LV_TEXT_DECOR_STRIKETHROUGH)) {
lv_draw_line_dsc_init(&line_dsc);
line_dsc.color = dsc->color;
line_dsc.width = font->underline_thickness;
line_dsc.width = font->underline_thickness ? font->underline_thickness : LV_MATH_MAX(font->line_height / 10, 1);
line_dsc.opa = dsc->opa;
line_dsc.blend_mode = dsc->blend_mode;
}

View File

@@ -95,7 +95,7 @@ lv_theme_t * lv_theme_empty_init(lv_color_t color_primary, lv_color_t color_seco
}
void theme_apply(lv_theme_t * th, lv_obj_t * obj, lv_theme_style_t name)
static void theme_apply(lv_theme_t * th, lv_obj_t * obj, lv_theme_style_t name)
{
LV_UNUSED(th);
if(name == LV_THEME_SCR) {