From 4f326c9c0ed9bfc79d3eccbe74b129a701145021 Mon Sep 17 00:00:00 2001 From: Robin Date: Fri, 29 Apr 2016 16:44:16 +0200 Subject: [PATCH] [skip ci] Added horizontal scrolling with the mousewheel when keeping shift pressed. --- Greenshot/Controls/NonJumpingPanel.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Greenshot/Controls/NonJumpingPanel.cs b/Greenshot/Controls/NonJumpingPanel.cs index 93f2f713c..6677c0da1 100644 --- a/Greenshot/Controls/NonJumpingPanel.cs +++ b/Greenshot/Controls/NonJumpingPanel.cs @@ -32,5 +32,23 @@ namespace GreenshotPlugin.Controls { // scrolling to the active control when the panel loses and regains focus return DisplayRectangle.Location; } + + /// + /// Add horizontal scrolling to the panel, when using the wheel and the shift key is pressed + /// + /// MouseEventArgs + protected override void OnMouseWheel(MouseEventArgs e) + { + if (VScroll && (ModifierKeys & Keys.Shift) == Keys.Shift) + { + VScroll = false; + base.OnMouseWheel(e); + VScroll = true; + } + else + { + base.OnMouseWheel(e); + } + } } }