Homework progress
This commit is contained in:
@@ -91,7 +91,13 @@ class MaMaGUI:
|
||||
if len(macros) > len(opened_macros):
|
||||
parent_depth = len(macros) - 1
|
||||
header_indent = " " * parent_depth + " " * macro_offset
|
||||
self.prog_list.insert(tk.END, f"{header_indent}[{macros[-1]}]")
|
||||
macro = macros[-1]
|
||||
if isinstance(macro, dict):
|
||||
params = ", ".join(f"{k}={v}" for k, v in macro.get("params", {}).items())
|
||||
header = f"{macro['name']}({params})" if params else macro["name"]
|
||||
else:
|
||||
header = str(macro)
|
||||
self.prog_list.insert(tk.END, f"{header_indent}[{header}]")
|
||||
self.prog_list.itemconfig(tk.END, {"bg": "#e6e6e6"})
|
||||
|
||||
instr_indent = " " * depth
|
||||
|
||||
Reference in New Issue
Block a user