fix(roller) make lv_roller_set_visible_row_count consider border width

This commit is contained in:
Gabor Kiss-Vamosi
2021-05-19 15:51:30 +02:00
parent 1a3f4d6b9c
commit 5f0fe3a22c
3 changed files with 6 additions and 3 deletions

View File

@@ -28,7 +28,9 @@ The get the currently selected option use `lv_roller_get_selected(roller)` it wi
`lv_roller_get_selected_str(roller, buf, buf_size)` copy the name of the selected option to `buf`.
### Visible rows
The number of visible rows can be adjusted with `lv_roller_set_visible_row_count(roller, num)`
The number of visible rows can be adjusted with `lv_roller_set_visible_row_count(roller, num)`.
This function calculates the height with the current style. If the font, line space, border width, etc of the roller changes this function needs to be called again.
## Events
- `LV_EVENT_VALUE_CHANGED` Sent when a new option is selected.