소스 검색

Merge pull request #681 from BDisp/faster-scroll-view

Faster ScrollView. Try it with CharacterMap.
Charlie Kindel 5 년 전
부모
커밋
04cbe23cb0
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      Terminal.Gui/Views/ScrollView.cs

+ 2 - 2
Terminal.Gui/Views/ScrollView.cs

@@ -271,9 +271,9 @@ namespace Terminal.Gui {
 					return true;
 				} else if (location <= barsize) {
 					if (location > 1 && location >= b2)
-						SetPosition (Math.Min (pos + barsize, Size));
+						SetPosition (Math.Min (pos + (Size / location), Size - 1));
 					else if (location <= b2 && pos > 0 || pos > 0)
-						SetPosition (Math.Max (pos - barsize, 0));
+						SetPosition (Math.Max (pos - (Size / barsize), 0));
 				}
 			}