|
@@ -145,14 +145,6 @@ internal class ScrollSlider : View
|
|
return base.OnMouseLeave (mouseEvent);
|
|
return base.OnMouseLeave (mouseEvent);
|
|
}
|
|
}
|
|
|
|
|
|
- /// <inheritdoc />
|
|
|
|
- internal override void OnLayoutComplete (LayoutEventArgs args)
|
|
|
|
- {
|
|
|
|
- base.OnLayoutComplete (args);
|
|
|
|
-
|
|
|
|
- _host._wasSliderLayoutComplete = true;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
internal int GetPositionFromSliderLocation (int location)
|
|
internal int GetPositionFromSliderLocation (int location)
|
|
{
|
|
{
|
|
if (_host.GetContentSize ().Height == 0 || _host.GetContentSize ().Width == 0)
|
|
if (_host.GetContentSize ().Height == 0 || _host.GetContentSize ().Width == 0)
|
|
@@ -167,7 +159,7 @@ internal class ScrollSlider : View
|
|
if ((_host.Orientation == Orientation.Vertical && location + Frame.Height >= scrollSize)
|
|
if ((_host.Orientation == Orientation.Vertical && location + Frame.Height >= scrollSize)
|
|
|| (_host.Orientation == Orientation.Horizontal && location + Frame.Width >= scrollSize))
|
|
|| (_host.Orientation == Orientation.Horizontal && location + Frame.Width >= scrollSize))
|
|
{
|
|
{
|
|
- return _host.Size - scrollSize;
|
|
|
|
|
|
+ return _host.Size - scrollSize;
|
|
}
|
|
}
|
|
|
|
|
|
return (int)Math.Min (Math.Round ((double)(location * _host.Size + location) / scrollSize), _host.Size - scrollSize);
|
|
return (int)Math.Min (Math.Round ((double)(location * _host.Size + location) / scrollSize), _host.Size - scrollSize);
|
|
@@ -210,6 +202,14 @@ internal class ScrollSlider : View
|
|
return new (location, dimension);
|
|
return new (location, dimension);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /// <inheritdoc/>
|
|
|
|
+ internal override void OnLayoutComplete (LayoutEventArgs args)
|
|
|
|
+ {
|
|
|
|
+ base.OnLayoutComplete (args);
|
|
|
|
+
|
|
|
|
+ _host._wasSliderLayoutComplete = true;
|
|
|
|
+ }
|
|
|
|
+
|
|
// TODO: I think you should create a new `internal` view named "ScrollSlider" with an `Orientation` property. It should inherit from View and override GetNormalColor and the mouse events
|
|
// TODO: I think you should create a new `internal` view named "ScrollSlider" with an `Orientation` property. It should inherit from View and override GetNormalColor and the mouse events
|
|
// that can be moved within it's Superview, constrained to move only horizontally or vertically depending on Orientation.
|
|
// that can be moved within it's Superview, constrained to move only horizontally or vertically depending on Orientation.
|
|
// This will really simplify a lot of this.
|
|
// This will really simplify a lot of this.
|