Windows opens
This commit is contained in:
parent
ccae883f17
commit
8b2476eeeb
|
@ -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
|
Binary file not shown.
Binary file not shown.
|
@ -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):
|
Loading…
Reference in New Issue