I've added a feature that does best fit of the surface in the editor when a file (from clipboard) is opened.

This commit is contained in:
Robin Krom 2022-02-19 08:55:33 +01:00
commit 354eec34a3
No known key found for this signature in database
GPG key ID: BCC01364F1371490
2 changed files with 13 additions and 3 deletions

View file

@ -181,8 +181,19 @@ namespace Greenshot.Editor.Forms
UpdateUi(); UpdateUi();
// Use best fit // Use best fit, for those capture modes where we can get huge images
ZoomBestFitMenuItemClick(this, EventArgs.Empty); bool useBestFit = _surface.CaptureDetails.CaptureMode switch
{
CaptureMode.File => true,
CaptureMode.Clipboard => true,
CaptureMode.IE => true,
_ => false
};
if (useBestFit)
{
ZoomBestFitMenuItemClick(this, EventArgs.Empty);
}
// Workaround: As the cursor is (mostly) selected on the surface a funny artifact is visible, this fixes it. // Workaround: As the cursor is (mostly) selected on the surface a funny artifact is visible, this fixes it.
HideToolstripItems(); HideToolstripItems();

View file

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<!--<system.windows.forms jitDebugging="true" />-->
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup> </startup>