Windows opens

This commit is contained in:
Dennis Eckerskorn 2024-11-26 19:17:50 +01:00
parent ccae883f17
commit 8b2476eeeb
6 changed files with 11 additions and 10 deletions

View File

@ -1,4 +1,4 @@
from MutiFunctionProgramProject.ui.centered_window import CenteredWindow
from ui.centered_window import CenteredWindow
def main():
# Crear una instancia de la ventana centrada

0
src/ui/__init__.py Normal file
View File

Binary file not shown.

Binary file not shown.

View File

@ -9,8 +9,8 @@ class CenteredWindow(ctk.CTk):
self.title(title)
# Obtener la resolucion de la pantalla:
screen_width = self.winfo.screenwidth()
screen_height = self.winfo.screenheight()
screen_width = self.winfo_screenwidth()
screen_height = self.winfo_screenheight()
# Calcula el tamaño de la ventana según procentaje de la pantalla:
window_width = int(screen_width * width_percentage)
@ -22,6 +22,7 @@ class CenteredWindow(ctk.CTk):
self.geometry(f"{window_width}x{window_height}+{position_x}+{position_y}")
#Configura la ventana (fuera del constructor)
self.configure_window()
def configure_window(self):