Skip to content

Commit e47e18b

Browse files
author
dima.am
committed
Add to ScrollViewer new property - ScrollMultiplier
1 parent 350a4fe commit e47e18b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/Myra/Graphics2D/UI/Containers/ScrollViewer.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,13 @@ public IImage VerticalScrollKnob
135135
get; set;
136136
}
137137

138-
[Browsable(false)]
138+
[Category("Appearance")]
139+
public int ScrollMultiplier
140+
{
141+
get; set;
142+
} = 10;
143+
144+
[Browsable(false)]
139145
[Content]
140146
public override Widget Content
141147
{
@@ -395,7 +401,7 @@ public override void OnMouseWheel(float delta)
395401
return;
396402
}
397403

398-
var step = 10 * ScrollMaximum.Y / _thumbMaximumY;
404+
var step = ScrollMultiplier * ScrollMaximum.Y / _thumbMaximumY;
399405
if (delta < 0)
400406
{
401407
_scrollbarOrientation = Orientation.Vertical;

0 commit comments

Comments
 (0)