OSDN Git Service
(root)
/
kancollesniffer
/
KancolleSniffer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8674f3b
)
スクロールバーが大きく動くときにページ単位でスクロールさせる
author
Kazuhiro Fujieda
<fujieda@users.osdn.me>
Mon, 24 Apr 2017 11:50:21 +0000
(20:50 +0900)
committer
Kazuhiro Fujieda
<fujieda@users.osdn.me>
Mon, 24 Apr 2017 11:50:21 +0000
(20:50 +0900)
KancolleSniffer/ShipListPanel.cs
patch
|
blob
|
history
diff --git
a/KancolleSniffer/ShipListPanel.cs
b/KancolleSniffer/ShipListPanel.cs
index
a594daa
..
33d5239
100644
(file)
--- a/
KancolleSniffer/ShipListPanel.cs
+++ b/
KancolleSniffer/ShipListPanel.cs
@@
-196,8
+196,9
@@
namespace KancolleSniffer
return;
\r
}
\r
ScrollBar.Minimum = 0;
\r
- var max = _shipList.Length - Height / LineHeight;
\r
- ScrollBar.LargeChange = Math.Min(10, max);
\r
+ var lines = Math.Max(1, Height / LineHeight);
\r
+ var max = _shipList.Length - lines;
\r
+ ScrollBar.LargeChange = Math.Min(lines, max);
\r
ScrollBar.Maximum =
\r
Math.Max(0, max + ScrollBar.LargeChange - 1); // ScrollBarを最大まで動かしてもmaxには届かない
\r
ScrollBar.Value = Math.Min(ScrollBar.Value, max);
\r