From 7331580bfd2ce55a7d49f6db821ffba7aa906c8a Mon Sep 17 00:00:00 2001 From: Simon Forman Date: Mon, 15 Apr 2024 21:18:24 -0700 Subject: [PATCH] Update canvas width and height when window changes. I don't know why Tk(inter) doesn't do this? --- ui.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui.py b/ui.py index 5cd0bc3..4e2a224 100755 --- a/ui.py +++ b/ui.py @@ -102,7 +102,10 @@ class App: notebook.pack(expand=True, fill=BOTH) def handle_canvas_resize(self, event): - print(event) + # I don't know why the Tk system doesn't update these values. + self.canvas['width'] = event.width + self.canvas['height'] = event.height + # print(event) def update_star_system_tab(self, name, x, y): self.star_name_label['text'] = name