From b2c6a8a2eee80260c0af8e4c18211781be8b11d2 Mon Sep 17 00:00:00 2001 From: paulloclara Date: Thu, 19 Dec 2019 15:12:54 -0300 Subject: [PATCH] refactor: cnf e cnf padrao add ao elemento por padrao --- src/utils/tk.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/utils/tk.py b/src/utils/tk.py index 112ad31..754729d 100644 --- a/src/utils/tk.py +++ b/src/utils/tk.py @@ -25,6 +25,9 @@ def obter_label(master, cnf={}, pack={}, grid={}): else: label.pack(pack) + label.style_cnf = cnf + label.default_style_cnf = cnf_padrao + return label @staticmethod @@ -48,6 +51,9 @@ def obter_botao(master, cnf={}, pack={}, grid={}): else: botao.pack(pack) + botao.style_cnf = cnf + botao.default_style_cnf = cnf_padrao + return botao @staticmethod @@ -74,6 +80,9 @@ def obter_input(master, cnf={}, pack={}, grid={}): else: _input.pack(pack) + _input.style_cnf = cnf + _input.default_style_cnf = cnf_padrao + return _input @staticmethod @@ -85,6 +94,8 @@ def obter_container(master, cnf={}, pack={}, grid={}): else: container.pack(pack) + container.style_cnf = cnf + return container @staticmethod @@ -94,11 +105,10 @@ def obter_janela(titulo='Nova Janela', tamanho='200x100'): janela.title(titulo) janela.geometry(tamanho) - return janela + janela.style_cnf = cnf + janela.default_style_cnf = cnf_padrao - @staticmethod - def Botao(): - return tk.Button + return janela @staticmethod def Janela():