pygui: added support for a details pane, can be toggled on/off, can be used to quickly view details for nodes or links
This commit is contained in:
parent
bb2ceaf993
commit
f582306bb9
12 changed files with 226 additions and 17 deletions
|
@ -138,6 +138,11 @@ class Menubar(tk.Menu):
|
|||
Create view menu
|
||||
"""
|
||||
menu = tk.Menu(self)
|
||||
menu.add_checkbutton(
|
||||
label="Details Panel",
|
||||
command=self.click_infobar_change,
|
||||
variable=self.app.show_infobar,
|
||||
)
|
||||
menu.add_checkbutton(
|
||||
label="Interface Names",
|
||||
command=self.click_edge_label_change,
|
||||
|
@ -443,6 +448,12 @@ class Menubar(tk.Menu):
|
|||
y = (row * layout_size) + padding
|
||||
node.move(x, y)
|
||||
|
||||
def click_infobar_change(self) -> None:
|
||||
if self.app.show_infobar.get():
|
||||
self.app.show_info()
|
||||
else:
|
||||
self.app.hide_info()
|
||||
|
||||
def click_edge_label_change(self) -> None:
|
||||
for edge in self.canvas.edges.values():
|
||||
edge.draw_labels()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue