pygui: updates to leverage tk provided constants for sticky configuration, instead of duplicate strings everywhere
This commit is contained in:
parent
2aeb119b04
commit
f0bc3bbc99
40 changed files with 501 additions and 496 deletions
|
@ -38,10 +38,10 @@ class CopyServiceConfigDialog(Dialog):
|
|||
label = ttk.Label(
|
||||
self.top, text=f"{self.service} - {self.file_name}", anchor=tk.CENTER
|
||||
)
|
||||
label.grid(sticky="ew", pady=PADY)
|
||||
label.grid(sticky=tk.EW, pady=PADY)
|
||||
|
||||
listbox_scroll = ListboxScroll(self.top)
|
||||
listbox_scroll.grid(sticky="nsew", pady=PADY)
|
||||
listbox_scroll.grid(sticky=tk.NSEW, pady=PADY)
|
||||
self.listbox = listbox_scroll.listbox
|
||||
for node in self.app.core.session.nodes.values():
|
||||
file_configs = node.service_file_configs.get(self.service)
|
||||
|
@ -54,15 +54,15 @@ class CopyServiceConfigDialog(Dialog):
|
|||
self.listbox.insert(tk.END, node.name)
|
||||
|
||||
frame = ttk.Frame(self.top)
|
||||
frame.grid(sticky="ew")
|
||||
frame.grid(sticky=tk.EW)
|
||||
for i in range(3):
|
||||
frame.columnconfigure(i, weight=1)
|
||||
button = ttk.Button(frame, text="Copy", command=self.click_copy)
|
||||
button.grid(row=0, column=0, sticky="ew", padx=PADX)
|
||||
button.grid(row=0, column=0, sticky=tk.EW, padx=PADX)
|
||||
button = ttk.Button(frame, text="View", command=self.click_view)
|
||||
button.grid(row=0, column=1, sticky="ew", padx=PADX)
|
||||
button.grid(row=0, column=1, sticky=tk.EW, padx=PADX)
|
||||
button = ttk.Button(frame, text="Cancel", command=self.destroy)
|
||||
button.grid(row=0, column=2, sticky="ew")
|
||||
button.grid(row=0, column=2, sticky=tk.EW)
|
||||
|
||||
def click_copy(self) -> None:
|
||||
selection = self.listbox.curselection()
|
||||
|
@ -112,8 +112,8 @@ class ViewConfigDialog(Dialog):
|
|||
self.top.columnconfigure(0, weight=1)
|
||||
self.top.rowconfigure(0, weight=1)
|
||||
self.service_data = CodeText(self.top)
|
||||
self.service_data.grid(sticky="nsew", pady=PADY)
|
||||
self.service_data.grid(sticky=tk.NSEW, pady=PADY)
|
||||
self.service_data.text.insert(tk.END, self.data)
|
||||
self.service_data.text.config(state=tk.DISABLED)
|
||||
button = ttk.Button(self.top, text="Close", command=self.destroy)
|
||||
button.grid(sticky="ew")
|
||||
button.grid(sticky=tk.EW)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue