Viewer: tweaks to make it work on a small window.