mirror of
https://github.com/lvgl/lvgl.git
synced 2026-06-01 00:51:49 +08:00
Roller visible 1 should have a full line-width height padding
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_roller_ext_t * ext = lv_obj_get_ext_attr(roller);
|
||||||
lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label);
|
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-1));
|
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