From 8dcb4755fbf8c7bd398d4da1c5b537f209b9a355 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 19 Nov 2021 10:40:45 +0100 Subject: [PATCH] remove int cast and use correct operator --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 538eb17..4b03593 100644 --- a/main.py +++ b/main.py @@ -8,8 +8,8 @@ def dimensionsFenetre(fenetre, taille: tuple): largeur = fenetre.winfo_screenwidth() hauteur = fenetre.winfo_screenheight() - x = int(largeur / 2 - taille[0] / 2) - y = int(hauteur / 2 - taille[1] / 2) + x = (largeur // 2) - (taille[0] // 2) + y = (hauteur // 2) - (taille[1] // 2) fenetre.geometry(f"{taille[0]}x{taille[1]}+{x}+{y}")