mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Update ImageEditorForm.cs
This commit is contained in:
parent
e5019bbb9d
commit
d9a6922310
1 changed files with 17 additions and 1 deletions
|
@ -898,13 +898,29 @@ namespace Greenshot {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
DateTime zoomStartTime = DateTime.Now;
|
||||
/// <summary>
|
||||
/// This is a "work-around" for the MouseWheel event which doesn't get to the panel
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void PanelMouseWheel(object sender, MouseEventArgs e) {
|
||||
if (System.Windows.Forms.Control.ModifierKeys.Equals(Keys.Control))
|
||||
{
|
||||
if (zoomStartTime.AddMilliseconds(100) < DateTime.Now) //waiting for next zoom step 100 ms
|
||||
{
|
||||
zoomStartTime = DateTime.Now;
|
||||
if (e.Delta > 0)
|
||||
{
|
||||
ZoomInMenuItemClick(sender, e);
|
||||
}
|
||||
else if (e.Delta < 0)
|
||||
{
|
||||
ZoomOutMenuItemClick(sender, e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
panel1.Focus();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue