Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hutchinson <m.j.hutchinson@gmail.com>2011-10-29 05:35:47 +0400
committerMichael Hutchinson <m.j.hutchinson@gmail.com>2011-10-29 05:35:47 +0400
commitf1f606ad957a7dd2f6a9c0001e4c605dc2ace894 (patch)
tree724035c37b36a135968d39a84d25f989ff731a20 /main/src/addins/VersionControl
parentc9466c714dc7e999ce7e5353cc55bdda2ded22a7 (diff)
[VersionControl] Better linked smooth scrolling for compare views
Diffstat (limited to 'main/src/addins/VersionControl')
-rw-r--r--main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/EditorCompareWidgetBase.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/EditorCompareWidgetBase.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/EditorCompareWidgetBase.cs
index 6a12147b2d..5e8c00c440 100644
--- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/EditorCompareWidgetBase.cs
+++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/EditorCompareWidgetBase.cs
@@ -511,10 +511,15 @@ namespace MonoDevelop.VersionControl.Views
}
base.OnSizeAllocated (allocation);
}
-
+
+ // FIXME: if the editors have different adjustment ranges, the pixel deltas
+ // don't really feel quite right since they're applied after scaling via the
+ // linked adjustment
protected override bool OnScrollEvent (EventScroll evnt)
{
- var alloc = Allocation;
+ //using the size of an editor for the calculations means pixel deltas apply better
+ var alloc = editors[0].Allocation;
+
double dx, dy;
evnt.GetPageScrollPixelDeltas (alloc.Width, alloc.Height, out dx, out dy);