Lists no longer have stale scroll values when enlarged

This commit is contained in:
Sasha Koshka 2023-02-11 21:45:04 -05:00
parent c64ce8da67
commit 2d9a941da8

View File

@ -60,6 +60,9 @@ func (element *List) handleResize () {
element.entries[index] = element.resizeEntryToFit(entry) element.entries[index] = element.resizeEntryToFit(entry)
} }
if element.scroll > element.maxScrollHeight() {
element.scroll = element.maxScrollHeight()
}
element.draw() element.draw()
if element.onScrollBoundsChange != nil { if element.onScrollBoundsChange != nil {
element.onScrollBoundsChange() element.onScrollBoundsChange()