Skip to content

Commit

Permalink
refactor: cnf e cnf padrao add ao elemento por padrao
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulloClara committed Dec 19, 2019
1 parent 0fb8b63 commit b2c6a8a
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/utils/tk.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -85,6 +94,8 @@ def obter_container(master, cnf={}, pack={}, grid={}):
else:
container.pack(pack)

container.style_cnf = cnf

return container

@staticmethod
Expand All @@ -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():
Expand Down

0 comments on commit b2c6a8a

Please sign in to comment.