fix(ui): list: ensure the offset line does not go negative when scrolling up
Ayman Bagabas
created
When scrolling up in the list, the offset line could become negative if
there was a gap between items. This change ensures that the offset line
is clamped to zero in such cases, preventing potential rendering issues.
This also adds a check to avoid unnecessary scrolling when already at
the bottom of the list. The calculation of item height has been
simplified by using strings.Count directly.