Ruben2776 / PicView

Fast, free and customizable image viewer for Windows 10 and 11.
https://picview.org
Other
995 stars 66 forks source link

Fix window not staying in place when changing images #4

Open Ruben2776 opened 4 years ago

Ruben2776 commented 4 years ago

Currently the window is forced to center, to avoid gradually losing center position.

This would be nice to fix, so that you could drag the application around and change images, while still having it the window resizing.

Like how JPEGView works (which this application is heavily inspired by).

Resizing is done by a window sizing override https://github.com/Ruben2776/PicView/blob/9970e8cd9a0676bb5af31a0973b0f0eb02269724/PicView/Views/Windows/MainWindow.xaml.cs#L126

and a function to scale the image https://github.com/Ruben2776/PicView/blob/9970e8cd9a0676bb5af31a0973b0f0eb02269724/PicView/UILogic/Sizing/ScaleImage.cs#L149

mardulas commented 1 year ago

The setting "keep window centered" does not do anything, I suppose this is why?

mardulas commented 1 year ago

Actually it does something, it forces the window a bit up and left (from the center) when it's on. So on means it's not centered and off means it's centered. Ahem...

mardulas commented 1 year ago

At least when I turn off resize window and keep centered, then it keeps the window position. Which is ok.

arthur1976 commented 1 year ago

在最新版本 没人发现 将图片设置成桌面背景时软件就卡死 退出吗?

Ruben2776 commented 1 year ago

在最新版本 没人发现 将图片设置成桌面背景时软件就卡死 退出吗?

My apologies. The wallpaper function has been fixed in the latest version. I know it's a bit slow when effects are applied, I might improve it in the future.