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

@ -1,3 +1,4 @@
import tkinter as tk
import webbrowser
from tkinter import ttk
@ -13,13 +14,13 @@ class EmaneInstallDialog(Dialog):
def draw(self) -> None:
self.top.columnconfigure(0, weight=1)
label = ttk.Label(self.top, text="EMANE needs to be installed!")
label.grid(sticky="ew", pady=PADY)
label.grid(sticky=tk.EW, pady=PADY)
button = ttk.Button(
self.top, text="EMANE Documentation", command=self.click_doc
)
button.grid(sticky="ew", pady=PADY)
button.grid(sticky=tk.EW, pady=PADY)
button = ttk.Button(self.top, text="Close", command=self.destroy)
button.grid(sticky="ew")
button.grid(sticky=tk.EW)
def click_doc(self) -> None:
webbrowser.open_new("https://coreemu.github.io/core/emane.html")