bcpkgfox 0.16.28__tar.gz → 0.16.29__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bcpkgfox-0.16.28 → bcpkgfox-0.16.29}/PKG-INFO +1 -1
- {bcpkgfox-0.16.28 → bcpkgfox-0.16.29}/bcpkgfox/__init__.py +25 -15
- {bcpkgfox-0.16.28 → bcpkgfox-0.16.29}/bcpkgfox.egg-info/PKG-INFO +1 -1
- {bcpkgfox-0.16.28 → bcpkgfox-0.16.29}/setup.py +1 -1
- {bcpkgfox-0.16.28 → bcpkgfox-0.16.29}/README.md +0 -0
- {bcpkgfox-0.16.28 → bcpkgfox-0.16.29}/bcpkgfox/clean.py +0 -0
- {bcpkgfox-0.16.28 → bcpkgfox-0.16.29}/bcpkgfox/cli.py +0 -0
- {bcpkgfox-0.16.28 → bcpkgfox-0.16.29}/bcpkgfox/find_elements.py +0 -0
- {bcpkgfox-0.16.28 → bcpkgfox-0.16.29}/bcpkgfox/get_driver.py +0 -0
- {bcpkgfox-0.16.28 → bcpkgfox-0.16.29}/bcpkgfox/invoke_api.py +0 -0
- {bcpkgfox-0.16.28 → bcpkgfox-0.16.29}/bcpkgfox/system.py +0 -0
- {bcpkgfox-0.16.28 → bcpkgfox-0.16.29}/bcpkgfox.egg-info/SOURCES.txt +0 -0
- {bcpkgfox-0.16.28 → bcpkgfox-0.16.29}/bcpkgfox.egg-info/dependency_links.txt +0 -0
- {bcpkgfox-0.16.28 → bcpkgfox-0.16.29}/bcpkgfox.egg-info/entry_points.txt +0 -0
- {bcpkgfox-0.16.28 → bcpkgfox-0.16.29}/bcpkgfox.egg-info/requires.txt +0 -0
- {bcpkgfox-0.16.28 → bcpkgfox-0.16.29}/bcpkgfox.egg-info/top_level.txt +0 -0
- {bcpkgfox-0.16.28 → bcpkgfox-0.16.29}/setup.cfg +0 -0
|
@@ -354,18 +354,15 @@ def mostrar_mensagem(mensagem, tamanho_fonte=12, negrito=False, button: Optional
|
|
|
354
354
|
janela.title("Atenção!")
|
|
355
355
|
janela.configure(bg="white")
|
|
356
356
|
|
|
357
|
-
largura, altura = 400, 200
|
|
358
|
-
pos_x = (janela.winfo_screenwidth() - largura) // 2
|
|
359
|
-
pos_y = (janela.winfo_screenheight() - altura) // 2
|
|
360
|
-
janela.geometry(f"{largura}x{altura}+{pos_x}+{pos_y}")
|
|
361
|
-
janela.resizable(False, False)
|
|
362
|
-
janela.attributes("-topmost", True)
|
|
363
|
-
|
|
364
357
|
estilo_fonte = ("Helvetica", tamanho_fonte, "bold" if negrito else "normal")
|
|
365
358
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
359
|
+
# container para label + botões
|
|
360
|
+
container = tk.Frame(janela, bg="white")
|
|
361
|
+
container.pack(padx=20, pady=20)
|
|
362
|
+
|
|
363
|
+
label = tk.Label(container, text=mensagem, bg="white", fg="black",
|
|
364
|
+
font=estilo_fonte, wraplength=360, justify="center")
|
|
365
|
+
label.pack(fill="both", expand=True)
|
|
369
366
|
|
|
370
367
|
if isinstance(button, dict):
|
|
371
368
|
resultado = tk.IntVar()
|
|
@@ -373,33 +370,46 @@ def mostrar_mensagem(mensagem, tamanho_fonte=12, negrito=False, button: Optional
|
|
|
373
370
|
def make_cmd(value):
|
|
374
371
|
return lambda: resultado.set(value)
|
|
375
372
|
|
|
376
|
-
frame_botoes = tk.Frame(
|
|
377
|
-
frame_botoes.pack(pady=10)
|
|
378
|
-
|
|
373
|
+
frame_botoes = tk.Frame(container, bg="white")
|
|
374
|
+
frame_botoes.pack(pady=10)
|
|
379
375
|
for i, texto in enumerate(button.keys(), start=1):
|
|
380
376
|
tk.Button(frame_botoes, text=texto, command=make_cmd(i), width=10,
|
|
381
377
|
font=("Helvetica", 10)).pack(side="left", padx=5)
|
|
382
378
|
|
|
383
379
|
janela.grab_set()
|
|
384
380
|
janela.focus_set()
|
|
381
|
+
janela.update_idletasks()
|
|
382
|
+
# ajusta ao tamanho real
|
|
383
|
+
w = janela.winfo_reqwidth()
|
|
384
|
+
h = janela.winfo_reqheight()
|
|
385
|
+
x = (janela.winfo_screenwidth() - w) // 2
|
|
386
|
+
y = (janela.winfo_screenheight() - h) // 2
|
|
387
|
+
janela.geometry(f"{w}x{h}+{x}+{y}")
|
|
385
388
|
janela.wait_variable(resultado)
|
|
386
389
|
root.destroy()
|
|
387
390
|
return resultado.get()
|
|
388
391
|
|
|
389
392
|
else:
|
|
390
393
|
if button:
|
|
391
|
-
tk.Button(
|
|
394
|
+
tk.Button(container, text="OK",
|
|
395
|
+
command=lambda: (janela.destroy(), root.destroy()),
|
|
392
396
|
width=10, font=("Helvetica", 10)).pack(pady=10)
|
|
393
397
|
|
|
394
398
|
janela.grab_set()
|
|
395
399
|
janela.focus_set()
|
|
400
|
+
janela.update_idletasks()
|
|
401
|
+
w = janela.winfo_reqwidth()
|
|
402
|
+
h = janela.winfo_reqheight()
|
|
403
|
+
x = (janela.winfo_screenwidth() - w) // 2
|
|
404
|
+
y = (janela.winfo_screenheight() - h) // 2
|
|
405
|
+
janela.geometry(f"{w}x{h}+{x}+{y}")
|
|
406
|
+
|
|
396
407
|
if button:
|
|
397
408
|
janela.wait_window()
|
|
398
409
|
else:
|
|
399
410
|
root.mainloop()
|
|
400
411
|
return janela
|
|
401
412
|
|
|
402
|
-
|
|
403
413
|
def fechar_janela(janela_=None):
|
|
404
414
|
global janela
|
|
405
415
|
if janela_ == None: janela.destroy()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|