Skip to content
This repository has been archived by the owner on Oct 19, 2018. It is now read-only.

Commit

Permalink
Close #124
Browse files Browse the repository at this point in the history
  • Loading branch information
luiges90 committed Jul 10, 2013
1 parent 8293c6a commit 9a14f4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions TabListPlugin/TabListPlugin/ListKind.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion TabListPlugin/TabListPlugin/TabListInFrame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 9a14f4f

Please sign in to comment.