mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 18:57:28 -07:00
[skip ci] Added horizontal scrolling with the mousewheel when keeping shift pressed.
This commit is contained in:
parent
db5a92dea4
commit
4f326c9c0e
1 changed files with 18 additions and 0 deletions
|
@ -32,5 +32,23 @@ namespace GreenshotPlugin.Controls {
|
|||
// scrolling to the active control when the panel loses and regains focus
|
||||
return DisplayRectangle.Location;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add horizontal scrolling to the panel, when using the wheel and the shift key is pressed
|
||||
/// </summary>
|
||||
/// <param name="e">MouseEventArgs</param>
|
||||
protected override void OnMouseWheel(MouseEventArgs e)
|
||||
{
|
||||
if (VScroll && (ModifierKeys & Keys.Shift) == Keys.Shift)
|
||||
{
|
||||
VScroll = false;
|
||||
base.OnMouseWheel(e);
|
||||
VScroll = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.OnMouseWheel(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue