Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image and Icon SizeModes are AutoSize - Should Be Zoom #213

Closed
SeanAWalsh opened this issue May 20, 2021 · 2 comments
Closed

Image and Icon SizeModes are AutoSize - Should Be Zoom #213

SeanAWalsh opened this issue May 20, 2021 · 2 comments

Comments

@SeanAWalsh
Copy link

I believe that

NetSparkle.UI.WinForms.NetCore\CheckingForUpdatesWindow.Designer.cs
NetSparkle.UI.WinForms.NetCore\MessageNotificationWindow.Designer.cs
NetSparkle.UI.WinForms.NetFramework\CheckingForUpdatesWindow.Designer.cs
NetSparkle.UI.WinForms.NetFramework\MessageNotificationWindow.Designer.cs

NetSparkle.UI.WinForms.NetCore\DownloadProgressWindow.resx
NetSparkle.UI.WinForms.NetCore\UpdateAvailableWindow.resx
NetSparkle.UI.WinForms.NetFramework\DownloadProgressWindow.resx

Use AutoSize where (I think) Zoom is intended

See: https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.pictureboxsizemode?view=net-5.0

says

  • AutoSize - The PictureBox is sized equal to the size of the image that it contains.
  • CenterImage - The image is displayed in the center if the PictureBox is larger than the image. If the image is larger than the PictureBox, the picture is placed in the center of the PictureBox and the outside edges are clipped.
  • Normal - The image is placed in the upper-left corner of the PictureBox. The image is clipped if it is larger than the PictureBox it is contained in.
  • StretchImage - The image within the PictureBox is stretched or shrunk to fit the size of the PictureBox.
  • Zoom - The size of the image is increased or decreased maintaining the size ratio.

I note that

 NetSparkle.UI.WinForms.NetCore\ToastNotifier.designer.cs
 NetSparkle.UI.WinForms.NetFramework\ToastNotifier.designer.cs

use a SizeMode of CenterImage and the Form Constructor goes to the trouble of creating a 48 x 48 version of the icon.
The others don't and so strange things happen with larger images. As I said in Issue #212, I think this may be part of issue #123's problems. I have a user with this problem (his buttons are not visible on the Form at all). I'll see if I can fix him.

@Deadpikle
Copy link
Collaborator

Fixed in 2b169dc and ddb336f

@Deadpikle
Copy link
Collaborator

Thanks for your notes on that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants