diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2015-02-11 17:23:06 +0300 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2015-02-11 17:23:06 +0300 |
commit | c9c33bb840e3f046ff71bfe0c9868fb1b923a495 (patch) | |
tree | 43323c79412626afca496e2e79661886c963dc3b /main | |
parent | bd4ef481310a1db2a9d2fc4efa02e46790bca28f (diff) |
Implemented 'Bug 26924 - [Win32] Shift+mouse wheel doesn't scroll
horizontally'.
Diffstat (limited to 'main')
-rw-r--r-- | main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs index c1efa4f730..8872924319 100644 --- a/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs +++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs @@ -1631,18 +1631,31 @@ namespace Mono.TextEditor var hasZoomModifier = (evnt.State & modifier) != 0; if (hasZoomModifier && lastScrollTime != 0 && (evnt.Time - lastScrollTime) < 100) hasZoomModifier = false; - + if (hasZoomModifier) { if (evnt.Direction == ScrollDirection.Up) Options.ZoomIn (); else if (evnt.Direction == ScrollDirection.Down) Options.ZoomOut (); - + this.QueueDraw (); if (isMouseTrapped) FireMotionEvent (mx + textViewMargin.XOffset, my, lastState); return true; } + + if (!Platform.IsMac) { + if ((evnt.State & ModifierType.ShiftMask) == ModifierType.ShiftMask) { + if (evnt.Direction == ScrollDirection.Up) + HAdjustment.Value += HAdjustment.StepIncrement * 3; + else if (evnt.Direction == ScrollDirection.Down) + HAdjustment.Value -= HAdjustment.StepIncrement * 3; + + this.QueueDraw (); + + return true; + } + } lastScrollTime = evnt.Time; return base.OnScrollEvent (evnt); } |