defcenterilaze(root: Tk,width:int,height:int):# Gets both half the screen width/height and window width/height positionRight =int(root.winfo_screenwidth()/2- width/2) positionDown =int(root.winfo_screenheight()/2.5- height/2)# Positions the window in the center of the page. root.geometry(f"{width}x{height}+{positionRight}+{positionDown}") root.geometry("+{}+{}".format(positionRight, positionDown))
📢 2 yerine 2.5'a bölerek daha hoş bir gösterim amaçlanmaktadır.