mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-05-03 14:45:07 -04:00
Added fullscreen mode to browser and conversations
This commit is contained in:
parent
3c7b8511d7
commit
726ee8873e
4 changed files with 29 additions and 1 deletions
|
@ -1275,6 +1275,8 @@ class NetworkLeftPile(urwid.Pile):
|
|||
def keypress(self, size, key):
|
||||
if key == "ctrl l":
|
||||
self.parent.toggle_list()
|
||||
elif key == "ctrl g":
|
||||
self.parent.toggle_fullscreen()
|
||||
elif key == "ctrl e":
|
||||
self.parent.selected_node_info()
|
||||
elif key == "ctrl p":
|
||||
|
@ -1349,6 +1351,16 @@ class NetworkDisplay():
|
|||
self.left_pile.contents[0] = (self.known_nodes_display, options)
|
||||
self.list_display = 1
|
||||
|
||||
def toggle_fullscreen(self):
|
||||
if NetworkDisplay.given_list_width != 0:
|
||||
self.saved_list_width = NetworkDisplay.given_list_width
|
||||
NetworkDisplay.given_list_width = 0
|
||||
else:
|
||||
NetworkDisplay.given_list_width = self.saved_list_width
|
||||
|
||||
options = self.widget.options("given", NetworkDisplay.given_list_width)
|
||||
self.widget.contents[0] = (self.left_area, options)
|
||||
|
||||
def show_peers(self):
|
||||
options = self.left_pile.options(height_type="weight", height_amount=1)
|
||||
self.left_pile.contents[0] = (self.lxmf_peers_display, options)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue