Skip to content

Commit

Permalink
allow float number for custom zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
d2phap committed Dec 13, 2023
1 parent 7822aa6 commit f3a32ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/ImageGlass/FrmMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1293,7 +1293,7 @@ public void LoadImageInfo(ImageInfoUpdateTypes? types = null, string? filename =
if (Config.ImageInfoTags.Contains(nameof(ImageInfo.Zoom))
&& (Local.Images.Length > 0 || isClipboardImage))
{
ImageInfo.Zoom = $"{Math.Round(PicMain.ZoomFactor * 100, 2):n0}%";
ImageInfo.Zoom = $"{Math.Round(PicMain.ZoomFactor * 100, 2):n2}%";
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion Source/ImageGlass/FrmMain/FrmMain.IGMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ public void IG_CustomZoom()

if (frm.ShowDialog(this) != DialogResult.OK) return;

if (int.TryParse(frm.Value.Trim(), out var newZoom))
if (float.TryParse(frm.Value.Trim(), out var newZoom))
{
PicMain.ZoomFactor = newZoom / 100f;
}
Expand Down

0 comments on commit f3a32ee

Please sign in to comment.