[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [nyx/master] Fix torrc panel scrollbar
commit c4b2fed3e6860c1d0ccf6afb0851361a5994d11a
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
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
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits