diff options
author | Alan McGovern <alan.mcgovern@gmail.com> | 2011-11-24 19:38:47 +0400 |
---|---|---|
committer | Alan McGovern <alan.mcgovern@gmail.com> | 2011-11-24 19:40:00 +0400 |
commit | b2068b38d2ee8914dda662e4a2b55920469d50fa (patch) | |
tree | 6a42c678c0fd98077e2c6459d06c031dafd5178c /main/src | |
parent | 57b7c01c8580b9c099023e4fee65c316b2659e90 (diff) |
[Core] Handle both vertical and horizontal tabs correctly
Additional fix for the previous commit - when the tabs are vertical
we should do our checking agaist the Y coordinates, not the X ones.
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DragNotebook.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DragNotebook.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DragNotebook.cs index 07c990d147..e4b31349a7 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DragNotebook.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DragNotebook.cs @@ -89,8 +89,12 @@ namespace MonoDevelop.Ide.Gui (tabMinY <= cursorY) && (cursorY <= tabMaxY)) return pageNumber; - if (!direction.HasValue) - direction = cursorX > tabMaxX ? 1 : -1; + if (!direction.HasValue) { + if (TabPos == PositionType.Top || TabPos == PositionType.Bottom) + direction = cursorX > tabMaxX ? 1 : -1; + else + direction = cursorY > tabMaxY ? 1 : -1; + } pageNumber += direction.Value; } |