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

Text in the status bar is not shortened properly when window is very wide #125

Open d-uzlov opened 4 years ago

d-uzlov commented 4 years ago

When window width is small, status bar shows text with shortened file name: name beginning...name end.ext (1/10) [image resolution (scale)] image size, to ensure that status bar text fits the StatusBar window element. However, when window becomes wider, size of the StatusBar and text length are not adjusted properly. The wider the window, the bigger part of the status bar text is drawn outside of the screen.

StatusBar element of the window seems to have some maximum width. So, for example, if the window have width 500 pixels then StatusBar is 400px, if window is 1000px then StatusBar is 900px, and regardless of how wide the window is, StatusBar won't be wider than 900px (I didn't actually measure anything, but for me these numbers seems close). However, when cutting the status bar text, only the width of the window seems to be taken into account, as if there were no maximum width for the StatusBar. So that with long enough file name and wide enough window the end of the status bar text is not visible.

P.S. Also there is a small insignificant issue when window width is very small. It seems like first N letters of the file name is always shown, and then part of the status bar text is shortened into three periods (as "..."). If the StatusBar width if very small, then not only part of the file name, but also part of the additional info (index of image in the folder, resolution and so on). Maybe it would be better to reduce the number of the letters before "..." in file name, so that additional info after the file name is always visible.

Tested on v1.1.7 Win x64.