diff --git a/TabListPlugin/TabListPlugin/ListKind.cs b/TabListPlugin/TabListPlugin/ListKind.cs index ee45e553..b3aff11a 100644 --- a/TabListPlugin/TabListPlugin/ListKind.cs +++ b/TabListPlugin/TabListPlugin/ListKind.cs @@ -249,7 +249,7 @@ public void LoadFromXMLNode(XmlNode rootNode) public void MoveHorizontal(int offset) { - this.HorizontalScrollBar.X += offset; + this.HorizontalScrollBar.X -= (int)((double)offset / (this.tabList.RowRectangles[0].Width) * (this.tabList.VisibleLowerClient.Width - this.VerticalScrollBar.Width)); if (this.HorizontalScrollBar.Left < this.tabList.VisibleLowerClient.Left) { this.HorizontalScrollBar.X = this.tabList.VisibleLowerClient.Left; @@ -260,14 +260,13 @@ public void MoveHorizontal(int offset) } if (this.SelectedTab != null) { - offset = (offset * this.tabList.VisibleLowerClient.Width) / this.HorizontalScrollBar.Width; - this.SelectedTab.MoveHorizontal(-offset); + this.SelectedTab.MoveHorizontal(offset); } } public void MoveVertical(int offset) { - this.VerticalScrollBar.Y += offset; + this.VerticalScrollBar.Y += (int) ((double) offset / (this.tabList.rowHeight * this.tabList.gameObjectList.Count) * (this.tabList.VisibleLowerClient.Height - this.VerticalScrollBar.Height)); if (this.VerticalScrollBar.Top < (this.tabList.VisibleLowerClient.Top + this.tabList.columnheaderHeight)) { this.VerticalScrollBar.Y = this.tabList.VisibleLowerClient.Top + this.tabList.columnheaderHeight; @@ -278,7 +277,6 @@ public void MoveVertical(int offset) } if (this.SelectedTab != null) { - offset = (offset * (this.tabList.VisibleLowerClient.Height - this.tabList.columnheaderHeight)) / this.VerticalScrollBar.Height; this.SelectedTab.MoveVertical(-offset); } } diff --git a/TabListPlugin/TabListPlugin/TabListInFrame.cs b/TabListPlugin/TabListPlugin/TabListInFrame.cs index e158dfb9..91d6a0bd 100644 --- a/TabListPlugin/TabListPlugin/TabListInFrame.cs +++ b/TabListPlugin/TabListPlugin/TabListInFrame.cs @@ -782,7 +782,7 @@ private void screen_OnMouseScroll(Point position, int scrollValue) { if (this.ShowVerticalScrollBar) { - this.listKindToDisplay.MoveVertical((this.oldScrollValue - scrollValue) / 6); + this.listKindToDisplay.MoveVertical((this.oldScrollValue - scrollValue)); } else if (this.ShowHorizontalScrollBar) {