Autoheight calculates highest visible item

Autoheight now works with more than a single visible item.