Browse Source

Rename to start and end.

BDisp 11 months ago
parent
commit
da85d581f8
1 changed files with 5 additions and 5 deletions
  1. 5 5
      Terminal.Gui/Views/Scroll/Scroll.cs

+ 5 - 5
Terminal.Gui/Views/Scroll/Scroll.cs

@@ -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);
         }