mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-30 09:47:58 +01:00
Rename to start and end.
This commit is contained in:
@@ -128,15 +128,15 @@ public class Scroll : View
|
||||
int location = Orientation == Orientation.Vertical ? mouseEvent.Position.Y : mouseEvent.Position.X;
|
||||
int barSize = BarSize;
|
||||
|
||||
(int topLeft, int bottomRight) sliderPos = _orientation == Orientation.Vertical
|
||||
? new (_slider.Frame.Y, _slider.Frame.Bottom - 1)
|
||||
: new (_slider.Frame.X, _slider.Frame.Right - 1);
|
||||
(int start, int end) sliderPos = _orientation == Orientation.Vertical
|
||||
? new (_slider.Frame.Y, _slider.Frame.Bottom - 1)
|
||||
: new (_slider.Frame.X, _slider.Frame.Right - 1);
|
||||
|
||||
if (mouseEvent.Flags.HasFlag (MouseFlags.Button1Pressed) && location < sliderPos.topLeft)
|
||||
if (mouseEvent.Flags.HasFlag (MouseFlags.Button1Pressed) && location < sliderPos.start)
|
||||
{
|
||||
Position = Math.Max (Position - barSize, 0);
|
||||
}
|
||||
else if (mouseEvent.Flags.HasFlag (MouseFlags.Button1Pressed) && location > sliderPos.bottomRight)
|
||||
else if (mouseEvent.Flags.HasFlag (MouseFlags.Button1Pressed) && location > sliderPos.end)
|
||||
{
|
||||
Position = Math.Min (Position + barSize, Size - barSize);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user