optimize auto fit with scrollbars
add support for HiDPI devices