If a vertical lists has a multiple childs of different heights, the scrollbar thumb does not reach the end of the scrollbar
franlovera1 opened this issue · comments
Describe the bug
If a vertical lists has a multiple childs of different heights, the scrollbar thumb does not reach the end of the scrollbar when the screen is fully scrolled.
_gx_vertical_list_scroll_info_get() only calculates the scroll maximum correctly if all the childs are the size of list->gx_vertical_list_child_height. If the childs has varying heights, the calculation is incorrect.
A suggested fix would be to iterate though all the childs and add the height of each child one by one:
Please also mention any information which could help others to understand
the problem you're facing:
- What target device are you using? STM MCU
- Which version of Azure RTOS? 6.3.0
- What toolchain and environment? clang
- What have you tried to diagnose or workaround this issue? yes see proposed solution
To Reproduce
Steps to reproduce the behavior:
- create a vertical list with childs of different heights.
- Add a scroll bar to the vertical lists, set size to relative,
- Run code. The scrollbar does not reach the bottom
Expected behavior
When the screen is fully scrolled, the scrollbar thumb does not reach the bottom of the bar.
Impact
What impact does this issue have on your progress (e.g., annoyance, showstopper): annoyance
Logs and console output
If applicable, add console logs or other types of debug information like Wireshark capture as .zip
file.
Additional context
Add any other context about the problem here.
@franlovera1 Thank you for your feedback, we'll investigate the issue.
@franlovera1 This issue has been fixed in this PR: #93
Thanks, I'll take a look!