Update canvas width and height when window changes.

I don't know why Tk(inter) doesn't do this?
This commit is contained in:
Simon Forman 2024-04-15 21:18:24 -07:00
parent de1a55de5e
commit 7331580bfd
1 changed files with 4 additions and 1 deletions

5
ui.py
View File

@ -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