Skip to content

Commit ec6ce5c

Browse files
committed
Added single line scrolling.
1 parent cb92e20 commit ec6ce5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

UI/ScrollableCustomControl.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ private void DoScroll(ScrollEventType type, ScrollProperties scrollProperties)
120120
switch (type)
121121
{
122122
case ScrollEventType.SmallDecrement:
123-
newValue = oldValue - scrollProperties.SmallChange;
123+
newValue = oldValue - (ModifierKeys == Keys.Control ? 1 : scrollProperties.SmallChange);
124124
break;
125125
case ScrollEventType.SmallIncrement:
126-
newValue = oldValue + scrollProperties.SmallChange;
126+
newValue = oldValue + (ModifierKeys == Keys.Control ? 1 : scrollProperties.SmallChange);
127127
break;
128128
case ScrollEventType.LargeDecrement:
129129
newValue = oldValue - scrollProperties.LargeChange;

0 commit comments

Comments
 (0)