Parcourir la source

BarSize should use Viewport.

BDisp il y a 1 an
Parent
commit
c43de60c08
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      Terminal.Gui/Views/Scroll/Scroll.cs

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

@@ -207,7 +207,7 @@ public class Scroll : View
 
     internal ScrollBar? SupView => SuperView as ScrollBar;
 
-    private int BarSize => Orientation == Orientation.Vertical ? GetContentSize ().Height : GetContentSize ().Width;
+    private int BarSize => Orientation == Orientation.Vertical ? Viewport.Height : Viewport.Width;
 
     private void SetScrollText ()
     {