mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-06-11 07:52:59 -04:00
Scale interface graphs according to terminal size
This commit is contained in:
parent
b022631382
commit
3ace328918
1 changed files with 6 additions and 2 deletions
|
@ -2218,8 +2218,12 @@ class ShowInterface(urwid.WidgetWrap):
|
||||||
|
|
||||||
self.config_rows = []
|
self.config_rows = []
|
||||||
|
|
||||||
self.history_length=60
|
screen_cols, _ = _get_cols_rows()
|
||||||
RNS.log(f"Col/rows: {_get_cols_rows()}")
|
margin = 22
|
||||||
|
if screen_cols >= 145:
|
||||||
|
self.history_length = screen_cols//2-margin
|
||||||
|
else:
|
||||||
|
self.history_length = screen_cols-margin
|
||||||
|
|
||||||
# get interface stats
|
# get interface stats
|
||||||
interface_stats = self.parent.app.rns.get_interface_stats()
|
interface_stats = self.parent.app.rns.get_interface_stats()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue