[tor-commits] [nyx/master] Fix torrc panel scrollbar

atagar at torproject.org atagar at torproject.org
Sun Jul 31 23:32:41 UTC 2016


commit c4b2fed3e6860c1d0ccf6afb0851361a5994d11a
Author: Damian Johnson <atagar at torproject.org>
Date:   Wed Jul 27 10:18:00 2016 -0700

    Fix torrc panel scrollbar
    
    Oops, scroll values were incorrect causing the scrollbar to be off.
---
 nyx/panel/torrc.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nyx/panel/torrc.py b/nyx/panel/torrc.py
index 3682f7f..374d86c 100644
--- a/nyx/panel/torrc.py
+++ b/nyx/panel/torrc.py
@@ -109,7 +109,7 @@ class TorrcPanel(panel.Panel):
     )
 
   def _draw(self, subwindow):
-    scroll = self._scroller.location(self._last_content_height - 1, subwindow.height - 1)
+    scroll = self._scroller.location(self._last_content_height, subwindow.height - 1)
 
     if self._torrc_content is None:
       subwindow.addstr(0, 1, self._torrc_load_error, RED, BOLD)
@@ -126,7 +126,7 @@ class TorrcPanel(panel.Panel):
 
       if self._last_content_height > subwindow.height - 1:
         scroll_offset = 3
-        subwindow.scrollbar(1, scroll, subwindow.height - 1)
+        subwindow.scrollbar(1, scroll, self._last_content_height - 1)
 
       y = 1 - scroll
       is_multiline = False  # true if we're in the middle of a multiline torrc entry





More information about the tor-commits mailing list