From 85bd5a9933b6b505ceedf308a283bec0f81eaace Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 3 Oct 2018 08:47:21 +0200 Subject: [PATCH] lv_btnm: minor fix on label's position with transparent button style --- lv_objx/lv_btnm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index 9511a7ce5..bc653190f 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -462,8 +462,8 @@ static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mo btn_style->body.border.part = LV_BORDER_RIGHT; } - /*Calculate the size of the text*/ + if(btn_style->glass) btn_style = bg_style; const lv_font_t * font = btn_style->text.font; lv_point_t txt_size; lv_txt_get_size(&txt_size, ext->map_p[txt_i], font, @@ -476,7 +476,6 @@ static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mo area_tmp.y2 = area_tmp.y1 + txt_size.y; - if(btn_style->glass) btn_style = bg_style; lv_draw_label(&area_tmp, mask, btn_style, opa_scale, ext->map_p[txt_i], LV_TXT_FLAG_NONE, NULL); } }