pygui: updates to leverage tk provided constants for sticky configuration, instead of duplicate strings everywhere

This commit is contained in:
Blake Harnden 2020-08-02 10:36:14 -07:00
parent 2aeb119b04
commit f0bc3bbc99
40 changed files with 501 additions and 496 deletions

View file

@ -38,7 +38,7 @@ class EdgeInfoFrame(InfoFrameBase):
dst_node = self.app.core.session.nodes[link.node2_id]
frame = DetailsFrame(self)
frame.grid(sticky="ew")
frame.grid(sticky=tk.EW)
frame.add_detail("Source", src_node.name)
iface1 = link.iface1
if iface1:
@ -90,7 +90,7 @@ class WirelessEdgeInfoFrame(InfoFrameBase):
iface2 = get_iface(dst_canvas_node, net_id)
frame = DetailsFrame(self)
frame.grid(sticky="ew")
frame.grid(sticky=tk.EW)
frame.add_detail("Source", src_node.name)
if iface1:
mac = iface1.mac if iface1.mac else "auto"

View file

@ -1,3 +1,4 @@
import tkinter as tk
from typing import TYPE_CHECKING
from core.gui.frames.base import DetailsFrame, InfoFrameBase
@ -18,7 +19,7 @@ class NodeInfoFrame(InfoFrameBase):
self.columnconfigure(0, weight=1)
node = self.canvas_node.core_node
frame = DetailsFrame(self)
frame.grid(sticky="ew")
frame.grid(sticky=tk.EW)
frame.add_detail("ID", node.id)
frame.add_detail("Name", node.name)
if NodeUtils.is_model_node(node.type):