kanryu / quickviewer

A image/comic viewer application for Windows, Mac and Linux, it can show images very fast
https://kanryu.github.io/quickviewer/
GNU General Public License v3.0
536 stars 63 forks source link

Issues with Restore windows display at next startup #127

Open yo1995 opened 4 years ago

yo1995 commented 4 years ago

What did you do?

Double click to open any image file, with the Restore windows display at next startup toggled on. During previous run, I changed the window size to fit the full screen.

What did you expect to happen?

The image should be displayed with the window size of QuickViewer the same as the previous run.

What actually happened?

Instead of displayed with the same size of last run (fullscreen), the viewer first spawn as the default size (the first state), then move to the upper left corner and load the image (the second state), and enlarged to the final size. Please check the GIFs below (slow down the frame rate to give a better view of it).

demo demo

The first state, extracted from a screen recording video state1

The second state state2

Potential cause

Though it does not matter, it doesn't feel good each time when open a image, the viewer need to glitch a bit. Might be related with https://github.com/kanryu/quickviewer/blob/ecbc5476431cd23f9e35c295f8e39410ab2ed411/QuickViewer/src/mainwindow.cpp#L233-L236

If I've time later, I'll follow through the calls to see what happened. It seems the window got redrawn 3 times during the launch with this option on.

What are your versions?

OS: Windows 10 1803 Version: 1.1.8 Hardware: 2 monitors with different resolutions (should not matter).

kanryu commented 4 years ago

In short, do you not like that the background of the Window is displayed for a moment when QuickViewer restores the position and size of the Window and the last opened image?

QuickViewer pays attention to the speed of startup, and changing from the current operation will increase the time required for startup. Such consequences should be avoided.

yo1995 commented 4 years ago

In short, do you not like that the background of the Window is displayed for a moment when QuickViewer restores the position and size of the Window and the last opened image?

QuickViewer pays attention to the speed of startup, and changing from the current operation will increase the time required for startup. Such consequences should be avoided.

Hi, the issue is that when I toggle the restore option on, next time when I load an image, the window size does not restore directly, but rather first draw a default size window, then stretch the window to the restore size.

It would be visually nicer to directly draw the window as the restore size, instead of stretching from a default size. As you can see in the demo GIF, there were a noticeable window stretching process when loading the image.

Is this an intended behavior to improve performance? 🤔