This commit is contained in:
2026-04-27 11:00:40 +02:00
parent d4825553a9
commit 90bd0ecdf5
11 changed files with 1002 additions and 130 deletions
+14 -1
View File
@@ -90,7 +90,20 @@ def main():
show(0)
root.update_idletasks()
root.geometry("+0+0")
sw = root.winfo_screenwidth()
w = root.winfo_width()
h = root.winfo_height()
x = (sw - w) // 2
root.geometry(f"+{x}+0")
# Zapiš geometrii do souboru pokud byl předán argument --write-geometry=<cesta>
import json as _json
for arg in sys.argv:
if arg.startswith("--write-geometry="):
geom_path = Path(arg.split("=", 1)[1])
geom_path.write_text(_json.dumps({"x": x, "y": 0, "w": w, "h": h}), encoding="utf-8")
break
root.mainloop()