mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-31 16:27:03 +08:00
Merge pull request #713 from joltwallet/roller_visible_row_count_align_fix
Roller visible height fix
This commit is contained in:
+2
-1
@@ -163,7 +163,8 @@ void lv_roller_set_visible_row_count(lv_obj_t * roller, uint8_t row_cnt)
|
||||
{
|
||||
lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller);
|
||||
lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label);
|
||||
lv_ddlist_set_fix_height(roller, lv_font_get_height(style_label->text.font) * row_cnt + style_label->text.line_space * (row_cnt));
|
||||
uint8_t n_line_space = (row_cnt > 1) ? row_cnt - 1 : 1;
|
||||
lv_ddlist_set_fix_height(roller, lv_font_get_height(style_label->text.font) * row_cnt + style_label->text.line_space * n_line_space);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user