This commit is contained in:
weijian 2022-10-27 18:24:03 +08:00
parent 9c64fa1be0
commit 827e3f668e

View file

@ -30,8 +30,8 @@ class Window:
self.ws = self.win.winfo_screenwidth() # width of the screen self.ws = self.win.winfo_screenwidth() # width of the screen
self.hs = self.win.winfo_screenheight() # height of the screen self.hs = self.win.winfo_screenheight() # height of the screen
# calculate x and y coordinates for the Tk root window # calculate x and y coordinates for the Tk root window
x = (self.ws / 2) - 190 x = int((self.ws / 2) - 190)
y = (self.hs / 2) - 250 y = int((self.hs / 2) - 250)
self.win.geometry("430x370+{}+{}".format(x, y)) self.win.geometry("430x370+{}+{}".format(x, y))
# 布局 # 布局
self.set_layout() self.set_layout()