fix: sanitize settings JSON, asyncio get_running_loop, Defender exclusion, _btn cleanup, ASCII Save label
Made-with: Cursor
This commit is contained in:
@@ -111,7 +111,9 @@ def main() -> None:
|
||||
# HELPERS
|
||||
# ─────────────────────────────────────────────────────────────────────────
|
||||
def _btn(parent: Any, label: str, cmd: Any, w: int = 80, h: int = 28, **kw: Any) -> ctk.CTkButton:
|
||||
# Pop styling keys so they are never duplicated in **kw (CustomTkinter raises on duplicate font, etc.).
|
||||
# Pull known keys out first so **kw never duplicates CTkButton parameters (font, width, …).
|
||||
kw.pop("text", None)
|
||||
kw.pop("command", None)
|
||||
font = kw.pop("font", (FONT, 11))
|
||||
fg_color = kw.pop("fg_color", ACCENT)
|
||||
hover_color = kw.pop("hover_color", ACCENT2)
|
||||
@@ -669,7 +671,7 @@ def main() -> None:
|
||||
).pack(side="left")
|
||||
|
||||
ctk.CTkFrame(sf_outer, fg_color="transparent", height=4).pack()
|
||||
_btn(sf_outer, "💾 Save All Settings",
|
||||
_btn(sf_outer, "Save All Settings",
|
||||
lambda: _save_settings(verbose=True), w=220, h=36,
|
||||
font=(FONT, 13)).pack(anchor="w", padx=6, pady=8)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user