Update NonJumpingPanel.cs

This commit is contained in:
k41c 2021-02-19 13:58:39 +01:00 committed by GitHub
commit a3e4f2f92e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,16 +38,28 @@ namespace GreenshotPlugin.Controls {
/// </summary> /// </summary>
/// <param name="e">MouseEventArgs</param> /// <param name="e">MouseEventArgs</param>
protected override void OnMouseWheel(MouseEventArgs e) protected override void OnMouseWheel(MouseEventArgs e)
{ {//Check if Scrollbars available and CTRL key pressed -> Zoom IN OUT
if (VScroll && (ModifierKeys & Keys.Shift) == Keys.Shift) if((VScroll || HScroll)&& (ModifierKeys & Keys.Control) == Keys.Control)
{ {
VScroll = false; VScroll = false;
HScroll = false;
base.OnMouseWheel(e); base.OnMouseWheel(e);
VScroll = true; VScroll = true;
HScroll = true;
} }
else else
{ {
base.OnMouseWheel(e); //Vertical Scoll with SHIFT key pressed
if (VScroll && (ModifierKeys & Keys.Shift) == Keys.Shift )
{
VScroll = false;
base.OnMouseWheel(e);
VScroll = true;
}
else
{
base.OnMouseWheel(e);
}
} }
} }
} }