mirror of
https://github.com/fishyboteso/fishyboteso.git
synced 2024-08-30 18:32:13 +00:00
splash screen not responding fix
This commit is contained in:
parent
c9c2982403
commit
d22a4e79e5
@ -2,6 +2,7 @@ import logging
|
||||
import time
|
||||
import tkinter as tk
|
||||
from multiprocessing import Process, Queue
|
||||
from threading import Thread
|
||||
|
||||
from PIL import Image, ImageTk
|
||||
|
||||
@ -34,9 +35,17 @@ def show(win_loc, q):
|
||||
loc = (win_loc or default_loc).split("+")[1:]
|
||||
top.geometry("{}x{}+{}+{}".format(dim[0], dim[1], int(loc[0]) + int(dim[0] / 2), int(loc[1]) + int(dim[1] / 2)))
|
||||
|
||||
top.update()
|
||||
q.get()
|
||||
time.sleep(0.2)
|
||||
def waiting():
|
||||
q.get()
|
||||
time.sleep(0.2)
|
||||
running[0] = False
|
||||
Thread(target=waiting).start()
|
||||
|
||||
running = [True]
|
||||
while running[0]:
|
||||
top.update()
|
||||
time.sleep(0.1)
|
||||
|
||||
top.destroy()
|
||||
logging.debug("ended splash process")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user