The barSize should use the Scroll Viewport.

This commit is contained in:
BDisp
2024-09-03 19:43:28 +01:00
parent c43de60c08
commit 70b3be289b

View File

@@ -71,7 +71,7 @@ internal class ScrollSlider : View
{
int location = SuperViewAsScroll.Orientation == Orientation.Vertical ? mouseEvent.Position.Y : mouseEvent.Position.X;
int offset = _lastLocation > -1 ? location - _lastLocation : 0;
int barSize = SuperViewAsScroll.Orientation == Orientation.Vertical ? SuperViewAsScroll.GetContentSize ().Height : SuperViewAsScroll.GetContentSize ().Width;
int barSize = SuperViewAsScroll.Orientation == Orientation.Vertical ? SuperViewAsScroll.Viewport.Height : SuperViewAsScroll.Viewport.Width;
if (mouseEvent.Flags.HasFlag (MouseFlags.Button1Pressed) && _lastLocation == -1)
{