Refresh rows on roller text_font change

This commit is contained in:
fvanroie 2021-01-16 21:43:35 +01:00
parent d2c1195539
commit 009524959a

View File

@ -1034,10 +1034,14 @@ static void hasp_local_style_attr(lv_obj_t * obj, const char * attr_p, uint16_t
case ATTR_TEXT_FONT: {
lv_font_t * font = haspPayloadToFont(payload);
if(font) {
return lv_obj_set_style_local_text_font(obj, part, state, font);
uint8_t count;
if(check_obj_type(obj, LV_HASP_ROLLER)) count = my_roller_get_visible_row_count(obj);
lv_obj_set_style_local_text_font(obj, part, state, font);
if(check_obj_type(obj, LV_HASP_ROLLER)) lv_roller_set_visible_row_count(obj, count);
} else {
return Log.warning(TAG_ATTR, F("Unknown Font ID %s"), payload);
Log.warning(TAG_ATTR, F("Unknown Font ID %s"), payload);
}
return;
}
/* Border attributes */