mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 21:13:23 -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>
|
/// <summary>
|
||||||
/// This is a "work-around" for the MouseWheel event which doesn't get to the panel
|
/// This is a "work-around" for the MouseWheel event which doesn't get to the panel
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void PanelMouseWheel(object sender, MouseEventArgs e) {
|
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();
|
panel1.Focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue