[UI] fixed ImageViewer behavior when resizing window