minor bugfixes

This commit is contained in:
Gabor Kiss-Vamosi
2017-12-20 21:27:39 +01:00
parent d9590baf4c
commit 5654c97c6b
3 changed files with 10 additions and 4 deletions

View File

@@ -223,6 +223,13 @@ void lv_btnm_set_map(lv_obj_t * btnm, const char ** map)
}
}
act_y += btn_h + style_bg->body.padding.inner;
/*If no vertical padding then make sure the last row is at the bottom of 'btnm'*/
if(style_bg->body.padding.ver == 0 &&
act_y + btn_h * 2 > max_h) { /*Last row?*/
btn_h = max_h - act_y;
}
if(strlen(map_p_tmp[btn_cnt]) == 0) break; /*Break on end of map*/
map_p_tmp = &map_p_tmp[btn_cnt + 1]; /*Set the map to the next line*/
i_tot ++; /*Skip the '\n'*/